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