Skip to content

Instantly share code, notes, and snippets.

@greduan
Last active December 29, 2015 23:29
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 greduan/7743326 to your computer and use it in GitHub Desktop.
Save greduan/7743326 to your computer and use it in GitHub Desktop.
Node.js static file web server, exports .start()
var connect = require("connect"),
http = require("http");
var start = connect().use(connect.static(__dirname))
http.createServer(start).listen(2882);
console.log("Static file server running at\n => http://localhost:2882/\nCTRL + C to shutdown");
module.exports = start;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment