node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey »

start-express-http

start-express-http

Build Status Downloads/month

A HTTP listener helper for Express.js

Installation

$ npm install start-express-http --save

Example 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: 3000

To hide this log output, set the HIDE_SE_LOG flag to true:

$ HIDE_SE_LOG=true npm start

HIDE_SE_LOG can equal true or false (default false).