后端
文章平均质量分 78
我每天都在学习
这个作者很懒,什么都没留下…
展开
-
express框架下后端获取req.body报错undefined
req.body官方文档:Contains key-value pairs of data submitted in the request body. By default, it is undefined, and is populated when you use body-parsing middleware such as body-parser and multer.翻译:包含了提...原创 2020-04-03 11:06:21 · 1266 阅读 · 2 评论 -
node服务器使用mongoose与mongodb连接
mongoose:在node.js异步环境下对mongodb进行便捷操作的对象模型工具在项目中安装mongoose:$npm install mongoose启动mongodb(mongodb教程(菜鸟教程是个好东西)):#在指定目录启动数据库,默认运行在27017端口$mongod --dbpath "D:\data\db"在项目中创建db.jsconst mongoose=r...原创 2020-01-08 00:03:43 · 282 阅读 · 0 评论