摘要: mongoose连接详情参考官网 在项目中新建db文件夹 connect.js连接mongo: const mongoose=require('mongoose'); mongoose.connect("mongodb://localhost/27017",{ useNewUrlParser: tr 阅读全文
posted @ 2020-07-14 10:51 红妆 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 一、安装方式 安装mongodb :www.mongodb.com next-->complete-->Instal MongoD as Service 不勾选 --> Install MongoDB Compass 不勾选--> fish cmd 命令行 mongod 出现:shutting do 阅读全文
posted @ 2020-07-14 10:44 红妆 阅读(539) 评论(0) 推荐(0) 编辑
摘要: body-parser模块主要解析post接口请求 1、npm install body-parser -S 2、server.js中引用 const bodyParser=require('body-parser'); app.use(bodyParser.urlencoded({extended 阅读全文
posted @ 2020-07-14 10:14 红妆 阅读(286) 评论(0) 推荐(0) 编辑