Closed pjcevans closed 6 years ago
Specifically I connected using this based on MDN:
var mongoDB = 'mongodb://user:password@ds123.mlab.com:61123/database-name'; mongoose.connect(mongoDB, { useMongoClient: true }) var db = mongoose.connection; db.on('error', console.error.bind(console, 'MongoDB connection error:'));
Not sure if you're interested in keeping this tut up to date but providing feedback in case you are!
Connecting using Mongoose ^4.11.0 fails with the connection method used in the tutorial due to a change at Mongo HQ
The error and fix are detailed here: http://mongoosejs.com/docs/connections.html#use-mongo-client