Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
promise(core): Add Promise Option to Mongoose (#1560)
Browse files Browse the repository at this point in the history
Fixes #1559
codydaig authored Oct 15, 2016
1 parent b40cd2d commit 517dc32
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/env/default.js
Original file line number Diff line number Diff line change
@@ -7,6 +7,9 @@ module.exports = {
keywords: 'mongodb, express, angularjs, node.js, mongoose, passport',
googleAnalyticsTrackingID: process.env.GOOGLE_ANALYTICS_TRACKING_ID || 'GOOGLE_ANALYTICS_TRACKING_ID'
},
db: {
promise: global.Promise,
},
port: process.env.PORT || 3000,
host: process.env.HOST || '0.0.0.0',
// DOMAIN config should be set to the fully qualified application accessible
2 changes: 2 additions & 0 deletions config/lib/mongoose.js
Original file line number Diff line number Diff line change
@@ -29,6 +29,8 @@ module.exports.connect = function (cb) {
console.log(err);
} else {

mongoose.Promise = config.db.promise;

// Enabling mongoose debug mode if required
mongoose.set('debug', config.db.debug);

0 comments on commit 517dc32

Please sign in to comment.