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
Browse files Browse the repository at this point in the history
  • Loading branch information
codydaig committed Oct 12, 2016
1 parent 0ea8cec commit fdfa09d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/env/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
user: '',
pass: ''
},
promise: global.Promise,
// Enable mongoose debug mode
debug: process.env.MONGODB_DEBUG || false
},
Expand Down
3 changes: 2 additions & 1 deletion config/env/local.example.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ module.exports = {
options: {
user: '',
pass: ''
}
},
promise: global.Promise
},
sessionSecret: process.env.SESSION_SECRET || 'youshouldchangethistosomethingsecret',
facebook: {
Expand Down
1 change: 1 addition & 0 deletions config/env/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module.exports = {
}
*/
},
promise: global.Promise,
// Enable mongoose debug mode
debug: process.env.MONGODB_DEBUG || false
},
Expand Down
1 change: 1 addition & 0 deletions config/env/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
user: '',
pass: ''
},
promise: global.Promise,
// Enable mongoose debug mode
debug: process.env.MONGODB_DEBUG || false
},
Expand Down
2 changes: 2 additions & 0 deletions config/lib/mongoose.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit fdfa09d

Please sign in to comment.