I’m using these versions
"mongoose": "4.13.17",
"mongodb": "~3.1.13"
for this boilerplate
This is my connection code
var mongoose = require('mongoose');
mongoose.connect(process.env.MONGO_URI, { useMongoClient: true, });
and I’m checking the connection with this line-
console.log(mongoose.connection.readyState);
And I get status 2
(connecting) And it doesn’t connect. What am I doing wrong?