Skip to content

Instantly share code, notes, and snippets.

@jonmarkgo
Forked from ariamoraine/gist:3344062
Created August 13, 2012 21:03
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 jonmarkgo/3344093 to your computer and use it in GitHub Desktop.
Save jonmarkgo/3344093 to your computer and use it in GitHub Desktop.
var http = require('http'),
sys = require('sys'),
nodeStatic = require('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