安装 pm2

  • npm i pm2 -g 安装pm2, nodejs服务器管理器
  • 关闭finalShell ,云服务就断了,网页无法访问
  • pm2 start 启动文件.js 启动服务器
  • 如果是 express 框架的话就需要 pm2 start ./bin/www
    关闭finalShell ,云服务就断了,网页无法访问

访问页面

  • ip 地址的话需要带端口
    关闭finalShell ,云服务就断了,网页无法访问

相关文章: