Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async () => {
- try {
- const newDbClient = await MongoClient.connect(this.url,
- this.options);
- console.log(`DB is connected? ${newDbClient.isConnected()}`);
- ConnectMeCore.dbClient = newDbClient;
- return newDbClient;
- } catch (error) {
- console.error(`MongoDB connection failed with > ${error}`);
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement