Skip to content

jpstevens/start-express-mongoose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A Mongoose boot helper for Express.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published