var http = require('http'); var fs = require('fs'); http.createServer(function(req, res){ res.writeHead(200, {'Content-Type': 'text/html; charset=utf-8'}); var html = fs.readFileSync("./index.html"); res.end(html.toString()); }).listen(3000)