Skip to content

Commit d947729

Browse files
Dan WahlinDan Wahlin
Dan Wahlin
authored and
Dan Wahlin
committed
Updated connection info
1 parent 6c7ac58 commit d947729

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib/database.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ let connection = null;
88
class Database {
99

1010
open(callback) {
11-
const options = {};
11+
var options = {
12+
useMongoClient: true,
13+
promiseLibrary: global.Promise
14+
};
1215
mongoose.connect(connectionString, options, (err) => {
1316
if (err) {
1417
console.log('mongoose.connect() failed: ' + err);
1518
}
1619
});
1720
connection = mongoose.connection;
18-
mongoose.Promise = global.Promise;
1921

2022
mongoose.connection.on('error', (err) => {
2123
console.log('Error connecting to MongoDB: ' + err);

0 commit comments

Comments
 (0)