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); }); }