0.1.1 ⢠Published 11 years ago
start-express-http v0.1.1
start-express-http
A HTTP listener helper for Express.js
Installation
$ npm install start-express-http --saveExample Usage:
var app = require('express')();
// method #1
app.set('PORT', 3000);
// method #2
app.set('port', 3000);
// method #3
process.env.PORT = 3000;
// method #4 - do nothing
// default port is 3000
// start HTTP server
require('start-express-http').start(app)
.then(function(httpServer){/* success */})
.fail(function(err) { /* error */ });Hiding Log Output:
By default, this module will show log output similar to the following:
$ npm start
ā Server listening on port: 3000To hide this log output, set the HIDE_SE_LOG flag to true:
$ HIDE_SE_LOG=true npm startHIDE_SE_LOG can equal true or false (default false).