nisham22
10/5/2017 - 10:15 AM

pm2

Install nodejs

sudo apt-get install nodejs
sudo apt-get install build-essential

Install pm2

sudo npm install -g pm2
-g option tells npm to install globally

To start Application

pm2 start hello.js
 (It will assign App name same as the filename without  .js)

Run pm2 with memory limit

pm2 start server.js --name prerender --max-memory-restart 600M