From c52e3bf921fb410da27b5fe53065f0334faebc38 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Mon, 2 Nov 2020 22:04:26 +0100 Subject: [PATCH] add useCreateIndex to mongo connection --- db/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/db/index.ts b/db/index.ts index 4245af0..c578a04 100644 --- a/db/index.ts +++ b/db/index.ts @@ -13,6 +13,7 @@ function connect() { } connectedPromise = mongoose.connect(process.env.MONGO_URI, { + useCreateIndex: true, useNewUrlParser: true, useUnifiedTopology: true, })