Skip to content

Commit

Permalink
(node:12618) DeprecationWarning: current Server Discovery and Monitor…
Browse files Browse the repository at this point in the history
…ing engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor. (DeviaVir#1975)
  • Loading branch information
gitercn authored and YarnSeemannsgarn committed Apr 15, 2020
1 parent 0062b94 commit 41816d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = function (cb) {
(authMechanism ? '&authMechanism=' + authMechanism : '' )
}

require('mongodb').MongoClient.connect(connectionString, { useNewUrlParser: true }, function (err, client) {
require('mongodb').MongoClient.connect(connectionString, { useNewUrlParser: true, useUnifiedTopology: true}, function (err, client) {
if (err) {
console.error('WARNING: MongoDB Connection Error: ', err)
console.error('WARNING: without MongoDB some features (such as backfilling/simulation) may be disabled.')
Expand Down

0 comments on commit 41816d2

Please sign in to comment.