server/driver/MongoDb.js
/**
   * Connect to mongoose
   * @returns {Promise} If successfully connected to mongoDB database.
   */
Connect to mongoose
@returns {Promise} If successfully connected to mongoDB database.
Connect to mongoose @returns { Promise } If successfully connected to mongoDB database .
async connectDb() {
    try {
      await connect(process.env.MONGODB_URI, {
        useUnifiedTopology: true,
        useNewUrlParser: true,
      });
      this.logger.info("Connected To Database!");
    } catch (err) {
      this.logger.error("Connection To Database failed.", err);
      process.exit(1);
    }
  }
async connectDb ( ) { try { await connect ( process . env . MONGODB_URI , { useUnifiedTopology : true , useNewUrlParser : true , } ) ; this . logger . info ( "Connected To Database!" ) ; } catch ( err ) { this . logger . error ( "Connection To Database failed." , err ) ; process . exit ( 1 ) ; } }
Connect to mongoose
 @returns {Promise} If successfully connected to mongoDB database.
Connect to mongoose @returns { Promise } If successfully connected to mongoDB database .