GitXplorerGitXplorer
w

app-server

public
2 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
1cb1eb0691a9264581d53e25ee66a7a140c2cc2b

bumpted to 2.0.0

wwesleytodd committed 9 years ago
Unverified
d3fea97e634a40089938b8a24c57e9d3a6c8e9a7

Converted to babel and added some support for middleware options

wwesleytodd committed 9 years ago
Unverified
927b1d27a33e897936a3819ea5195be5d1f44f6a

Added templates and cookie parsing options

wwesleytodd committed 10 years ago
Unverified
efd7187980e21d8bab91353b84107aa2700e02c0

Fixed issue with hostname

wwesleytodd committed 10 years ago
Unverified
82dbd8ac0e67fe5089654b90b2a1daa91aaaa78b

Initial commit

wwesleytodd committed 10 years ago

README

The README file for this repository.

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');

// All these options are set to their default values
var server = new Server({
	port: 3000,
	hostname: null,
	logDir: 'log',
	logger: logtastic, // An instance of Logtastic
	trustProxy: true,
	compress: true,
	errorHandler: true,
	parseCookies: false,
	viewDir: null, // Full path to views
	viewEngine: null, // One of the modules provied by consolidate
	viewEngineSuffix: 'html'
});

// Setup routes
server.app.post('/', function(req, res) {
	res.status(200).json({hi: 'planet'});
});

// Start the server
server.start();