摘要:
// 引入mongoose第三方模块 用来操作数据库 const mongoose = require('mongoose'); // 数据库连接 mongoose.connect('mongodb://localhost/playground', { useNewUrlParser: true}) 阅读全文
摘要:
1 // 引入mongoose第三方模块 用来操作数据库 2 const mongoose = require('mongoose'); 3 // 数据库连接 4 mongoose.connect('mongodb://localhost/playground', { useUnifiedTopol 阅读全文
摘要:
导入json数据到数据库 mongoimport -d playground -c user --file ./user.json 如果导入不成功 ,在电脑环境变量PATH添加MongoDB的路径。 1 // 引入mongoose第三方模块 用来操作数据库 2 const mongoose = re 阅读全文