From 58b39faa1a1287eea0372234aad236d6193c16e0 Mon Sep 17 00:00:00 2001 From: Rohan Tarai Date: Sun, 10 Nov 2019 03:31:06 +0530 Subject: [PATCH] fixed Mongodb DeprecationWarning: { useUnifiedTopology: true } (#55) added "defaultOpt.useUnifiedTopology = true;" to remove "DeprecationWarning: pass option { useUnifiedTopology: true } to the MongoClient constructor" --- lib/databases/mongodb.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/databases/mongodb.js b/lib/databases/mongodb.js index 0d8555e..b46054a 100644 --- a/lib/databases/mongodb.js +++ b/lib/databases/mongodb.js @@ -49,6 +49,7 @@ var MongoSessionStore = function (options) { if (isNew) { defaultOpt.autoReconnect = false; defaultOpt.useNewUrlParser = true; + defaultOpt.useUnifiedTopology = true; _.defaults(options.options, defaultOpt); } else { defaultOpt.auto_reconnect = false;