text: 
  //CopyPaste. DB_STRING is in .env
  const mongoose = require('mongoose')
  
  //Connect to mongoDB
  const connectDB = async () => {
    try {
      const conn = await mongoose.connect(process.env.DB_STRING, {
        useNewUrlParser: true,
        useUnifiedTopology: true,
        useFindAndModify: false,
        useCreateIndex: true,
      })
  
      console.log(`MongoDB Connected: ${conn.connection.host}`)
    } catch (err) {
      console.error(err)
      process.exit(1)
    }
  }
  
  
  //Exports function connectDB
  module.exports = connectDB
  