Minimal web server using Node-Static
var static = require('node-static'); | |
// | |
// Create a node-static server instance to serve the current folder | |
// | |
var file = new(static.Server)(__dirname); | |
require('http').createServer(function (request, response) { | |
request.addListener('end', function () { | |
// | |
// Serve files! | |
// | |
file.serve(request, response); | |
}); | |
}).listen(8080); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment