node-http-server
/server.js |
@@ -14,7 +14,6 @@ |
const winston = require('winston'); |
const yargs = require('yargs'); |
const dns = require('dns'); |
const HttpCache = require("http-cache"); |
|
// Local imports. |
const Handler = require( |
@@ -91,14 +90,10 @@ |
process.exit(1); |
} |
|
// Create server-side cache. |
const httpcache = new HttpCache(); |
|
// Start HTTP server. |
http.createServer( |
// authentication, |
(request, response) => |
httpcache(request, response, () => { |
new Handler().process(config, request, response, root) |
.on('log', (data) => { |
log.log(data.severity, data.message); |
@@ -109,7 +104,6 @@ |
result.data |
.on('readable', () => result.data.pipe(response)) |
.on('end', () => response.end()); |
}); |
}) |
).listen(config.net.port, config.net.address, () => { |
log.info('HTTP Server accessible at: http://' + |