const mongoose = require(‘mongoose‘)
mongoose.connect("mongodb://localhost:27017/study", {useNewUrlParser:true}, function(err){
if(err){
console.log(‘Connection Error:‘ + err)
}else{
console.log(‘Connection success!‘) }
})
原文地址:https://www.cnblogs.com/TomAndJerry/p/9363951.html
时间: 2024-10-08 18:35:13