How to configure pm2 #5757
WesleyjanLacerda
started this conversation in
Show and tell
Replies: 2 comments
-
oh wow thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Nice job @WesleyjanLacerda , I use PM2 on some other applications and this makes it easier to deploy services in that realm... Thanks for the information... SomeGuru |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The purpose of the post is just informative for those who want to use pm2, as I searched a little here and didn't find this configuration, follow the step by step below:
OS: Ubuntu 20.04
Version: 1.1.11
Node: v16.20.2
With the application already configured, run:
sudo npm install -g pm2
Create a file
pm2.config.js
in the system root, to have the directory like this:/home/ubuntu/meshcentral/pm2.config.js
Inside the pm2.config.js file you can create other configurations, but the basics for how it works are this:
After creating and saving the file, run the command
sudo pm2 start pm2.config.js
.With the steps above followed, the application will be running automatically by pm2, check with
sudo pm2 ls
, but details in the documentation https://pm2.keymetrics.io/docs/usage/pm2-doc-single-page/.Beta Was this translation helpful? Give feedback.
All reactions