Fixed Mongoose Warning (#856)

This commit is contained in:
siddhant 2019-03-02 02:17:17 +05:30 committed by Cassie Tarakajian
parent 74ec1ba5bf
commit 456697ec75
1 changed files with 1 additions and 0 deletions

View File

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