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