// načtení knihoven const http = require("http"); const fs = require("fs"); const path = require("path"); //vytvoření chování serveru const server = http.createServer((req,res) => { const filePath = req.url === "/" ? "index.html" : req.url.slice(1); const fullPath = path.join(__dirname,filePath) fs.readFile(fullPath, (err, content) => { if(err) { res.writeHead(404, {"Content-Type":"text/html"}) res.end("