Skip to content

Instantly share code, notes, and snippets.

@jrom
Created February 2, 2012 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jrom/1723497 to your computer and use it in GitHub Desktop.
Save jrom/1723497 to your computer and use it in GitHub Desktop.
Super simple node file server
require('http').Server(function (req, res) {
require('fs').readFile(__dirname + require('url').parse(req.url).pathname, function (err, data) {
res.end(data);
});
}).listen(9000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment