Skip to content

Instantly share code, notes, and snippets.

@stevemao
Created November 4, 2015 05:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevemao/b78ff95477b90058ea77 to your computer and use it in GitHub Desktop.
Save stevemao/b78ff95477b90058ea77 to your computer and use it in GitHub Desktop.
var fs = require('fs');
var html;
fs.readFile('./index.html', function (err, data) {
html = data;
});
require('http').createServer(function (request, response) {
response.end(html);
}).listen(8080);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment