0.1.0 • Published 10 years ago
start-express-loader v0.1.0
start-express-loader
A promise-based service loader for Express.js
Installation
$ npm install start-express-loader --save
Example Usage:
First, install some things to load (for example, a Mongoose connection, or HTTP server):
npm install start-express-http start-express-mongoose --save
Then, in your javascript:
var app = require('express')(),
services = ['http','mongoose']; // define our services here
// will load 'start-express-http' and 'start-express-mongoose'
// start HTTP server
require('start-express-loader')
.start(app, services)
.then(function() { /* do something */ });
Your app is now up-and-running!
Hiding Log Output:
By default, this module output various logs to the command line. To hide this 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
).
0.1.0
10 years ago
0.0.0-pre1
10 years ago