From 282696f75da3b2fa2a3b6dee85d68be126e197a5 Mon Sep 17 00:00:00 2001 From: Stepan Usatiuk Date: Wed, 14 Oct 2020 10:38:05 +0300 Subject: [PATCH] add mongodb connection options --- config/db.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/db.js b/config/db.js index 8476856..0f31973 100644 --- a/config/db.js +++ b/config/db.js @@ -2,7 +2,10 @@ const mongoose = require('mongoose'); const config = require('./'); async function connect() { - await mongoose.connect(config.db.uri); + await mongoose.connect(config.db.uri, { + useNewUrlParser: true, + useUnifiedTopology: true, + }); } async function disconnect() {