Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. async () => {
  2. try {
  3. const newDbClient = await MongoClient.connect(this.url,
  4. this.options);
  5. console.log(`DB is connected? ${newDbClient.isConnected()}`);
  6. ConnectMeCore.dbClient = newDbClient;
  7. return newDbClient;
  8. } catch (error) {
  9. console.error(`MongoDB connection failed with > ${error}`);
  10. }
  11. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement