摘要: // 设置允许跨域访问 app.all('*', function (req, res, next) { res.header("Access-Control-Allow-Origin",req.headers.origin || '*'); //允许的header类型 res.header("Ac 阅读全文
posted @ 2020-11-27 13:54 chenlw101 阅读(619) 评论(0) 推荐(0) 编辑
摘要: //显示启动成功,浏览器访问却没有反应。 用netstat -ntlp查看监听端口,无3000 解决方法:执行ps -ef|grep pm2找到PM2的进程,kill -9 杀掉,再执行pm2 start 1. 启动 # pm2 start app.js # pm2 start app.js --n 阅读全文
posted @ 2020-11-27 10:56 chenlw101 阅读(117) 评论(0) 推荐(0) 编辑