new and final mono repo for the leaf me system: Leaf-Me is a full-stack Uber Eats-style delivery platform designed for dispensaries. The app streamlines the process of placing, preparing, and delivering orders through multiple role-based interfaces
PM2 is a production process manager for Node.js applications. It allows you to keep applications alive forever, reload them without downtime, and facilitate common system admin tasks.
Installation
install PM2 globally, run:
npm install pm2@latest -g
Basic PM2 Setup
Navigate to your project directory:
cd /path/to/your/project
Start your application with PM2:
pm2 start backend/server.js --name "my-app"
Replace backend/server.js with the path to your main server file.
Check the status of your processes:
pm2 list
Monitor your application:
pm2 monit
To stop your application:
pm2 stop "my-app"
To restart your application:
pm2 restart "my-app"
Additional PM2 Commands
View logs:
pm2 logs
Set up PM2 to start on system boot:
pm2 startup
Follow the instructions provided by this command.
Save the current PM2 process list:
pm2 save
PM2 Configuration File (Optional)
For more advanced setups, you can create a ecosystem.config.js file in your project root:
Originally posted by @PESolut in #4