start-express-mongoose

0.2.0 • Public • Published

start-express-mongoose

Build Status Downloads/month

A Mongoose boot helper for Express.js

Installation

$ npm install start-express-mongoose --save

Example Usage:

var app = require('express')();
 
// method #1
app.set('MONGO_URL', 'mongodb://user:pass@server.mongohq.com/db_name');
// method #2
process.env.MONGO_URL = 'mongodb://user:pass@server.mongohq.com/db_name';
 
// start HTTP server
require('start-express-mongoose').start(app)
.then(function(mongoose){/* success */})
.fail(function(err) { /* error */ });

Hiding Log Output:

By default, this module will show log output similar to the following:

$ npm start
✔ Mongoose connected to: mongodb://localhost/start-express-mongoose

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).

Readme

Keywords

none

Package Sidebar

Install

npm i start-express-mongoose

Weekly Downloads

4

Version

0.2.0

License

ISC

Last publish

Collaborators

  • jpstevens