Skip to content

Commit

Permalink
Fix mongodb for Fastify
Browse files Browse the repository at this point in the history
  • Loading branch information
JHyeok committed Apr 27, 2024
1 parent 47d0daf commit 3310a3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions frameworks/JavaScript/fastify/db/mongo.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,7 @@ let client;

async function getCollection(name) {
if (!client) {
client = await new MongoClient(
mongoUrl,
{
useNewUrlParser: true,
useUnifiedTopology: true
}
).connect();
client = await new MongoClient(mongoUrl).connect();
}

const db = client.db(dbName);
Expand Down
2 changes: 1 addition & 1 deletion frameworks/JavaScript/fastify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"fastify": "4.13.0",
"handlebars": "4.7.6",
"knex": "2.4.2",
"mongodb": "3.5.9",
"mongodb": "6.5.0",
"mysql2": "3.9.7",
"pg": "8.5.1"
}
Expand Down

0 comments on commit 3310a3b

Please sign in to comment.