Skip to content

Instantly share code, notes, and snippets.

@DTrejo
Created September 24, 2010 19:17
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 DTrejo/595872 to your computer and use it in GitHub Desktop.
Save DTrejo/595872 to your computer and use it in GitHub Desktop.
var static = require('node-static');
//
// Create a node-static server instance to serve the './public' folder
//
var file = new(static.Server)('./public');
require('http').createServer(function (request, response) {
request.addListener('end', function () {
//
// Serve files!
//
file.serve(request, response);
});
}).listen(8124);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment