The cloud server system version centos7.2, the project's deployment koa2, node version: 10.16.0
First, some of the problems of pm2
1, the installation pm2:
npm install -g pm2
2, the soft links, so that can be used globally pm2
ln -s software installation path to the target path
Examples: LN -s / usr / local / Node / bin / PM2 / usr / bin / PM2
3, into koa2 project, use the command to start the project pm2
pm2 start npm --watch --name koa2-test -- run start
--watch: monitor code changes (- no spaces between)
--name: Rename the task name (- no spaces between, example: --name koa2-TES , namely rename koa2-TES )
- behind the run with the script name (- space between)
two,