diff --git a/doc/pm2.md b/doc/pm2.md index 9ea6c71..7fed26d 100644 --- a/doc/pm2.md +++ b/doc/pm2.md @@ -1,4 +1,4 @@ -# Setup pm2 (update Sep 2023) +# Setup pm2 * configure pm2 like [this](https://pm2.io/docs/runtime/guide/installation/) to start API on system startup ``` @@ -95,51 +95,3 @@ $ sudo pm2 save #save current process list on reboot $ sudo pm2 unstartup #disable PM2 from starting at system boot $ sudo pm2 update #update PM2 package ``` - -# Setup PM2 - -* update Debian package repository cache -``` -sudo apt update -``` - -* globally install the latest stable version of PM2 via npm -``` -npm i -g pm2 -``` - -* create group and user ```pm2``` -following this [setup](grp-usr.md) - -* generate the startup script\ - **NOTE:** This instruction comes back with a reply like ```To setup the Startup Script, copy/paste the following command: sudo env PATH=$PATH:/usr/bin pm2 startup systemd -u --hp ``` -``` -pm2 startup systemd -u pm2 -``` - -* confirm that the PM2 startup service is up and running under systemd, run the following command -``` -systemctl status pm2-.service -``` - -# Helpful PM2 instructions - -* list all node application (process/microservices) -``` -pm2 list -``` - -* monitor logs, custom metrics, process information from all processes -``` -pm2 monit -``` - -* view details of a single Node.js process using the process ID or name -``` -pm2 show