Skip to content

Instantly share code, notes, and snippets.

@philpoore
Created October 9, 2014 03:34
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 philpoore/9d29abce53fa785b5de9 to your computer and use it in GitHub Desktop.
Save philpoore/9d29abce53fa785b5de9 to your computer and use it in GitHub Desktop.
Basic HTTP Server
require('express')().use(function (req, res){
res.end(require('fs').readFileSync(req.url.slice(1) || 'index.html'))
}).listen(process.argv[2])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment