is there a mongoose connect error callback

When you connect you can pick up the error in the callback:

mongoose.connect('mongodb://localhost/dbname', function(err) {
    if (err) throw err;
});

Leave a Comment