Created
February 2, 2012 13:34
-
-
Save jrom/1723497 to your computer and use it in GitHub Desktop.
Super simple node file server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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