From 32bb41560279dd0c75d0461f081873483e3aaed9 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 27 Jul 2016 21:15:07 +0200 Subject: Server: Use ES6 promise for mongoose/node-oatuh2-server --- server/initializers/database.js | 1 + 1 file changed, 1 insertion(+) (limited to 'server/initializers') diff --git a/server/initializers/database.js b/server/initializers/database.js index 4a19bc230..8626895ee 100644 --- a/server/initializers/database.js +++ b/server/initializers/database.js @@ -23,6 +23,7 @@ const database = { } function connect () { + mongoose.Promise = global.Promise mongoose.connect('mongodb://' + host + ':' + port + '/' + dbname) mongoose.connection.on('error', function () { throw new Error('Mongodb connection error.') -- cgit v1.2.3