0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-02 10:42:44 +00:00

Try upping Mongoose to 5.7.5 again

Apparently mongoose 5.7.0 has breaking changes.
This commit is contained in:
Trevor Buckner
2020-02-03 15:29:12 -05:00
parent 6ef88e0f1f
commit b75063f936
3 changed files with 152 additions and 163 deletions

View File

@@ -16,7 +16,8 @@ const config = require('nconf')
//DB
const mongoose = require('mongoose');
mongoose.connect(config.get('mongodb_uri') || config.get('mongolab_uri') || 'mongodb://localhost/naturalcrit');
mongoose.connect(config.get('mongodb_uri') || config.get('mongolab_uri') || 'mongodb://localhost/naturalcrit',
{ retryWrites: false, useNewUrlParser: true });
mongoose.connection.on('error', ()=>{
console.log('Error : Could not connect to a Mongo Database.');
console.log(' If you are running locally, make sure mongodb.exe is running.');