old_contents: const mongoose = require('mongoose');
  const config = require('./config');
  mongoose.Promise = global.Promise;
  mongoose.connect(config.mongo.url).then(() => {
    console.log('Connected to mongoDB');
  });
  
  module.exports = {
    mongoose: mongoose
  };
new_contents: const mongoose = require('mongoose');
  const config = require('./config');
  mongoose.Promise = global.Promise;
  
  mongoose.connect(config.mongo.url, { useNewUrlParser: true }).then(() => {
    console.log('Connected to mongoDB');
  });
  
  module.exports = {
    mongoose: mongoose
  };
  
subject: Update mongoose.js