fix mongo connection so that deprecation warning doesn't appear

This commit is contained in:
Cassie Tarakajian 2018-09-05 15:34:53 -04:00
parent 0f0be1f956
commit 02c7c2f26d

View file

@ -137,7 +137,7 @@ require('./config/passport');
// const passportConfig = require('./config/passport');
// Connect to MongoDB
mongoose.connect(mongoConnectionString);
mongoose.connect(mongoConnectionString, { useMongoClient: true });
mongoose.connection.on('error', () => {
console.error('MongoDB Connection Error. Please make sure that MongoDB is running.');
process.exit(1);