[ pm2 ]

Installation

npm install pm2 -g

 

Example

pm2 start index.js

start/restart

ssh ezderman@NODE.SERVER.IP <<EOF
cd ~/node-app
git pull
npm install --production
pm2 restart all
exit
EOF

With the –production flag (or when the NODE_ENV environment variable is set to production), npm will not install modules listed in devDependencies.

 

ref : https://medium.com/@mosheezderman/how-to-set-up-ci-cd-pipeline-for-a-node-js-app-with-jenkins-c51581cc783c,

https://docs.npmjs.com/cli/install,

http://pm2.keymetrics.io/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s