PM2
PM2 is a process manager for Node.js applications that allows you to manage and monitor your applications easily. It also provides a way to keep your Node.js applications running in the background even after you log out from your server.
To use PM2 to run the Asterune application, follow these steps:
Install PM2 globally on your server using the following command:
npm install -g pm2Navigate to the root directory of your Asterune application.
Start the application using the following command:
pm2 start yarn --name "framework" -- run startThis command starts the application using Yarn, with the name "framework". The
--nameflag is optional and allows you to give a custom name to the process.Verify that the application is running using the following command:
pm2 listThis command lists all the processes managed by PM2.
You can stop the application using the following command:
pm2 stop frameworkThis command stops the process with the name "framework". You can replace "framework" with the name of your custom process if you used a different name.
To restart the application, use the following command:
pm2 restart frameworkThis command restarts the process with the name "framework".
To monitor the application, use the following command:
pm2 monitThis command provides a real-time monitoring dashboard for all the processes managed by PM2.
To view the logs of the application, use the following command:
pm2 logs frameworkThis command shows the logs of the process with the name "framework". You can replace "framework" with the name of your custom process if you used a different name.
That's it! You can now use PM2 to manage and monitor your Asterune application.