Skip to content

Commit

Permalink
fix: return db instance
Browse files Browse the repository at this point in the history
  • Loading branch information
playerx committed Oct 15, 2023
1 parent deb7b78 commit b4ca534
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/connectMongo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export async function connectMongo(
// )

const client = new MongoClient(connectionString)
const db = await client.connect()
await client.connect()

const db = client.db()

return { client, db }
}

0 comments on commit b4ca534

Please sign in to comment.