pm2 and forever is a tool to run the process at the background, many of the angular developers are using these tools nowadays in any linux/amazon ec2 machines for angular universal server side rendering(ssr) for seo and many other features.
Herewith I have listed the few mostly used commands:
pm2 start your_js_file (pm2 start local.js) in my case for angular universal run,
this build is created using the below commands,
npm run build:prod (or) yarn run build:prod
npm run server (or) yarn run server
pm2 list: list down all the pm2 processes.
pm2 kill: to kill all the running pm2 processes
pm2 monit: to monitor the running processes
pm2 logs: to see the logs of the running pm2 processes.
forever local.js (runs directly)
forever start local.js (runs in daemon mode)
114 total views, 2 views today