Skip to content

Commit

Permalink
Remose useNewUrlParser.
Browse files Browse the repository at this point in the history
MongoClientOptions.useNewUrlParser has been removed: mongodb/node-mongodb-native#2623
  • Loading branch information
johntseng committed Jun 17, 2022
1 parent 7ab9f8e commit a3badd3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions webonary-cloud-api/lambda/mongo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ export async function connectToDB(): Promise<MongoClient> {
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;

Expand Down

0 comments on commit a3badd3

Please sign in to comment.