Skip to content
This repository has been archived by the owner on May 16, 2020. It is now read-only.

Commit

Permalink
Merge pull request #82 from cobalt-uoft/fix/mongoose-promise
Browse files Browse the repository at this point in the history
Use global.Promise as mongoose promise library #81
  • Loading branch information
qasim authored Jul 9, 2016
2 parents a0c91b5 + a5e7bf3 commit e548274
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ let test = process.argv.join().match('/ava/')
let enableSync = process.env.COBALT_ENABLE_DB_SYNC || 'true'

// Database connection setup
mongoose.Promise = global.Promise
mongoose.connect(process.env.COBALT_MONGO_URI, err => {
if (err) throw new Error(`Failed to connect to MongoDB [${process.env.COBALT_MONGO_URI}]: ${err.message}`)
if (!test) {
Expand Down

0 comments on commit e548274

Please sign in to comment.