1.1 搭建后端目录
1.1.1 全局命令:npm install express-generator -g
1.1.2 进入项目目录:express --view=ejs server
1.2 前端请求后端接口【本地测试】
1.2.1 手机和电脑是一个wifi
1.2.2 不可以使用localhost,必须要使用ip地址
查ip地址:
mac : ifconfig
window: ipconfig
1.2.3 cd serve切换目录后npm install
1.2.4 npm start