📅  最后修改于: 2022-03-11 14:53:26.025000             🧑  作者: Mango
var db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error:'));
db.once('open', function() {
// we're connected!
});