Skip to content

Instantly share code, notes, and snippets.

View nil2022's full-sized avatar

Nilanjan Haldar nil2022

View GitHub Profile
@nil2022
nil2022 / nvm.sh
Last active February 24, 2025 16:29
Install nvm in linux using cUrl
# 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
@nil2022
nil2022 / pm2-config-file
Created October 26, 2025 07:12
PM2 Multi-App & Service Setup Gist (Ubuntu Server) using config file
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: