//import moduly const http = require("http") const fs = require("fs") const path = require("path") const server = http.createServer((req,res)=>{ console.log("REQ:",req.url) const filePath = req.url === "/" ? "index.html":req.url.slice(1) //nalzeneme soubor const fullPath = path.join(__dirname,filePath) //načteme CELOU cestu console.log("otevírám:", fullPath) fs.readFile(fullPath,(err,content)=>{ if(err){ res.writeHead(404,{"content-type":"text/html; charset=utf-8"}) res.end("