Pages

Monday, December 10, 2018

Running file .js on server linux using pm2

Using  "pm2":

https://github.com/Unitech/pm2

Install Application :
- install pm2 "npm install pm2 -g"

- cd  folder/app/server.js

- Runing  " pm2 start server.js"



* gunakan command "pm2 list" untuk melihat seluruh process yang ada
* "pm2 <stop | start | delete | restart> <app_name | id> " untuk mengontrol process


* "pm2 logs <app_name | id>" untuk mendapatkan log file