This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install curl if not already installed | |
| sudo apt update && sudo apt install -y curl | |
| # Download and install NVM | |
| curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash | |
| # Load NVM into the current session | |
| source ~/.bashrc | |
| # Verify NVM installation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This is a Gist for the basic setup of PM2 for multiple apps on an Ubuntu server, covering installation, process creation via an ecosystem file, and system service mapping (autostart). | |
| PM2 Multi-App & Service Setup Gist (Ubuntu Server) | |
| PM2 (Process Manager 2) is essential for keeping your Node.js applications running 24/7 and restarting them automatically on crashes or reboots. | |
| 1. Initial Setup | |
| A. Install Node.js & PM2 | |
| Assuming you have Node.js installed on your Ubuntu server, install PM2 globally: |