Skip to content

Instantly share code, notes, and snippets.

@masylum
Forked from jrom/node-server.js
Created February 2, 2012 14:32
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 masylum/1723725 to your computer and use it in GitHub Desktop.
Save masylum/1723725 to your computer and use it in GitHub Desktop.
Super simple node file server
require('http').Server(function (req, res) {
require('fs').createReadStream(__dirname + require('url').parse(req.url).pathname).pipe(res);
}).listen(9000);
@txus
Copy link

txus commented Feb 2, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment