aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/database.js1
1 files changed, 1 insertions, 0 deletions
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 = {
23} 23}
24 24
25function connect () { 25function connect () {
26 mongoose.Promise = global.Promise
26 mongoose.connect('mongodb://' + host + ':' + port + '/' + dbname) 27 mongoose.connect('mongodb://' + host + ':' + port + '/' + dbname)
27 mongoose.connection.on('error', function () { 28 mongoose.connection.on('error', function () {
28 throw new Error('Mongodb connection error.') 29 throw new Error('Mongodb connection error.')