关于MongoDB基础使用
net start mongodb 开启数据库
net stop mongoDB 关闭数据库
const mongoose =require('mongoose');
mongoose.connect('mongodb://localhost/playground',{ useUnifiedTopology: true,useNewUrlParser: true })
.then(()=>console.log('数据库连接成功了'))
.catch(err=>console.log
原创
2021-09-12 23:22:01 ·
168 阅读 ·
0 评论