linux running in the background under the project node-js

  • Installation pm2, here you have a default installation node.js and npm
    npm install pm2 -g
  • Create a soft link
     global path path
    the PATH $ echo 
    pm2 installation path - When installing pm2, you can see pm2 installation path
    established soft connection: ln -s /usr/sbin/nodejs/bin/pm2 /usr/local/bin/ # 前一个为pm2安装目录,后一个选择path内任意一个:分割的地址
    to see if the installation was successful: pm2 list


  • Start project
    pm2 start app.js
  • Original Address: https://www.cnblogs.com/SimonHu1993/p/11646709.html

Guess you like

Origin www.cnblogs.com/lideqiang0909/p/12105483.html