App Server
A wrapper around a common configuration for an express application server. This module wraps the following modules:
It setup sane defaults for these modules and exposes simple confiuration options for tweaking. But overall it is an opinionated method for setting up an express service.
Install
$ npm install --save app-server
Basic Usage
var Server = require('app-server');
var server = new Server({
port: 3000,
hostname: null,
logDir: 'log',
logger: logtastic,
trustProxy: true,
compress: true,
errorHandler: true,
parseCookies: false,
viewDir: null,
viewEngine: null,
viewEngineSuffix: 'html'
});
server.app.post('/', function(req, res) {
res.status(200).json({hi: 'planet'});
});
server.start();