📅  最后修改于: 2022-03-11 15:03:41.782000             🧑  作者: Mango
mongoose.connect(process.env.DATABASE, {
useNewUrlParser: true,
useCreateIndex: true,
useFindAndModify: false,
useUnifiedTopology: true,
})
.then(() => {
console.log("DB connected");
})
.catch((err) => console.log(`DB connection Err`, err));