From 85e4f96777281678151ffede42679f42d5636cb7 Mon Sep 17 00:00:00 2001 From: Gabor Balla Date: Thu, 21 Jul 2016 10:19:25 +0200 Subject: [PATCH] feat(database): pass options to connect --- lib/database/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/database/index.js b/lib/database/index.js index 14f079f..21600d5 100644 --- a/lib/database/index.js +++ b/lib/database/index.js @@ -2,9 +2,10 @@ class Database { - constructor(mongoose, uri) { + constructor(mongoose, uri, options) { this._mongoose = mongoose; this._uri = uri; + this._options = options; } @@ -18,7 +19,7 @@ class Database { if (this._mongoose.connection.readyState === 2) { return this._mongoose.connection.once('connected', cb); } - this._mongoose.connect(this._uri, cb); + this._mongoose.connect(this._uri, this._options, cb); }); }