From a3badd3d6efb632e934deeab8efaca7e2b5a06e1 Mon Sep 17 00:00:00 2001 From: john Date: Thu, 16 Jun 2022 19:13:57 -0500 Subject: [PATCH] Remose useNewUrlParser. MongoClientOptions.useNewUrlParser has been removed: https://github.com/mongodb/node-mongodb-native/pull/2623 --- webonary-cloud-api/lambda/mongo.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/webonary-cloud-api/lambda/mongo.ts b/webonary-cloud-api/lambda/mongo.ts index 10912a4b..0c42df2f 100644 --- a/webonary-cloud-api/lambda/mongo.ts +++ b/webonary-cloud-api/lambda/mongo.ts @@ -7,9 +7,7 @@ export async function connectToDB(): Promise { return Promise.resolve(cachedDb); } - const client = await MongoClient.connect(process.env.DB_URL as string, { - useNewUrlParser: true, - }); + const client = await MongoClient.connect(process.env.DB_URL as string); cachedDb = client;