ssh username@server_ip_address
sudo apt update
sudo apt install nodejs
sudo apt install npm
node -v
npm -v
mkdir my-node-app
cd my-node-app
npm init -y
sudo npm install pm2 -g
pm2 start index.js
// other way
pm2 start {command} --name "APP NAME" -- {script}
//like
pm2 start npm --name "NODE APP" -- start
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter