2. node接口搭建--连接MongoDB数据库 (参考https://blog.csdn.net/ncepu_Chen/article/details/98725104#_337)

1.使用mongoose连接MongoDB数据库

npm install mongoose 

2.新建文件夹config存放数据库地址

 3.安装MongoDB

 

 

原文地址:https://www.cnblogs.com/lizhao123/p/11507786.html