Skip to content

Instantly share code, notes, and snippets.

@ariamoraine
Created August 13, 2012 20:59
Show Gist options
  • Save ariamoraine/3344062 to your computer and use it in GitHub Desktop.
Save ariamoraine/3344062 to your computer and use it in GitHub Desktop.
require.paths.unshift(__dirname + "/vendor");
var http = require('http'),
sys = require('sys'),
nodeStatic = require('node-static/lib/node-static');
var server = http.createServer(function(request, response) {
var file = new nodeStatic.Server('./public', {
cache: false
});
request.addListener('end', function() {
file.serve(request, response);
});
});
server.listen(8000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment