YApi使用遇到的问题

mp2 报错

No command ‘pm2’ found, did you mean:
Command ‘pm’ from package ‘powerman’ (universe)
Command ‘pmc’ from package ‘linuxptp’ (universe)
Command ‘pmi’ from package ‘powermanagement-interface’ (universe)
Command ‘pms’ from package ‘pms’ (universe)
Command ‘pmw’ from package ‘pmw’ (universe)
Command ‘wm2’ from package ‘wm2’ (universe)
Command ‘pmk’ from package ‘pmk’ (universe)
Command ‘pom2’ from package ‘libpod-pom-perl’ (universe)
pm2: command not found

安装mp2

npm install pm2 -g

依旧提示报错,添加软链接

ln -s /opt/node-v6.11.2-linux-x64/lib/node_modules/pm2/bin/pm2  /usr/local/bin

启动的时候发现的问题

安装完成后, 启动命令

pm2 start server/app.js --watch

发现ip:3000访问不了

那就直接用node后台启动吧

nohup node /root/my-yapi/vendors/server/app.js &

大海技术博客
请先登录后发表评论
  • latest comments
  • 总共0条评论