PM2 keeps your Node.js or Next.js app running 24/7 and auto-restarts it on reboot.
npm install -g pm2
cd /var/www/your-app
npm run build
pm2 start npm --name "my-app" -- start
pm2 save
pm2 startup
PM2 keeps your Node.js or Next.js app running 24/7 and auto-restarts it on reboot.
npm install -g pm2
cd /var/www/your-app
npm run build
pm2 start npm --name "my-app" -- start
pm2 save
pm2 startup