Skip to content

Instantly share code, notes, and snippets.

View morwalz's full-sized avatar
🎯
Focusing

Shankar morwal morwalz

🎯
Focusing
View GitHub Profile
@suissa
suissa / mongoose-connection-best-practices
Created August 26, 2014 23:38
Mongoose best practices
// Bring Mongoose into the app
var mongoose = require( 'mongoose' );
// Build the connection string
var dbURI = 'mongodb://localhost/mongoose-best-practices';
// Create the database connection
mongoose.connect(dbURI);
// CONNECTION EVENTS