Cleanest way to host static files using nodejs
2015/08/10 16:35Use built-in http
module and ecstatic
for middleware.
First, install ecstatic
npm install ecstatic
And the magic!
var http = require('http'),
ecstatic = require('ecstatic');
http.createServer(ecstatic({root:'./'}))
.listen(8080, '127.0.0.1');