const http = require('http'); const fs = require('fs'); const server = http.createServer((req, res) => { res.writeHead(200, { 'Content-Type': 'text/html' }); var date = readFileSync("./index.html", { encoding: 'utf-8' }); res.end(date); }); server.listen(80);