set db
This commit is contained in:
parent
6b908957c5
commit
9d4012a606
1 changed files with 3 additions and 1 deletions
|
@ -18,5 +18,7 @@ export const getMongoDBClient = async () => {
|
||||||
const client = new MongoClient(URI);
|
const client = new MongoClient(URI);
|
||||||
|
|
||||||
await client.connect();
|
await client.connect();
|
||||||
return client.db(DATABASENAME);
|
db = client.db(DATABASENAME);
|
||||||
|
|
||||||
|
return db;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue