摘要: 允许所有地址跨域: app.all("*",function(req,res,next){ //设置允许跨域的域名,*代表允许任意域名跨域 res.header("Access-Control-Allow-Origin","*"); //允许的header类型 res.header("Access- 阅读全文
posted @ 2021-06-08 22:34 封兴旺 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 1.快速创建项目: 安装:npm install -g express-generator 创建:express xxxx //根据提示完成安装启动服务:nodemon ./bin/www || npm start //默认端口3000更换启动文件为app.js: var http = requir 阅读全文
posted @ 2021-06-08 21:29 封兴旺 阅读(47) 评论(0) 推荐(0) 编辑

联系方式: 18274305123(微信同号)