Initial commit

This commit is contained in:
Luis Fernando Molina committed 2018-09-03 15:19:57 +02:00
commit f47e08fdcb
2409 files changed
+363607

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
'use strict';
const nodeStatic = require('node-static');
const server = new nodeStatic.Server('.', {cache: 0});
require('http').createServer(function(req, res) {
if (req.url === '/favicon.ico') {
req.destroy();
res.statusCode = 204;
return res.end();
}
req.on('end', function() {
server.serve(req, res, function(err) {
if (err) {
console.error(err, req.url);
res.writeHead(err.status, err.headers);
res.end();
}
});
});
req.resume();
}).listen(8088);
console.error('now listening on http://localhost:8088');