text: const mongoose = require('mongoose');
  const config = require('config');
  const db = config.get('mongoURI');
  
  
  let connectDB = async() => {
      try {
          await mongoose.connect(db,{
              useNewUrlParser:true,
              useUnifiedTopology: true
          });
          
          console.log(`MongoDb Connected`);
  
      } catch (error) {
          console.log(error.message);
          process.exit(1);
      }
  }
  
  
  module.exports = connectDB;