When you connect you can pick up the error in the callback:
mongoose.connect('mongodb://localhost/dbname', function(err) {
if (err) throw err;
});
When you connect you can pick up the error in the callback:
mongoose.connect('mongodb://localhost/dbname', function(err) {
if (err) throw err;
});