Skip to content

Instantly share code, notes, and snippets.

@usagi
Created June 28, 2012 02:26
Show Gist options
  • Select an option

  • Save usagi/3008373 to your computer and use it in GitHub Desktop.

Select an option

Save usagi/3008373 to your computer and use it in GitHub Desktop.
var http = require('http');
var fs = require('fs');
var index = fs.readFileSync('index.html');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end(index);
}).listen(9615);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment