v3.0.0/docs/pm2.md

12 lines
635 B
Markdown
Raw Normal View History

2019-03-01 06:12:44 +01:00
## Setting up PM2 to run lolisafe
The best way to keep the service running in case of crashes or unexpected issues is to attach the process to PM2 and forget about it. This also gives you the ability to dettach the process from your terminal and run it in the background, which is a must since lolisafe now comes in 2 separate processes.
The recommended way to set it up is to run the commands below, one for the API and the other for the site.
```
2019-03-12 05:45:47 +01:00
pm2 start npm --name "lolisafe-api" -- run api
pm2 start npm --name "lolisafe-site" -- run site
2019-03-01 06:12:44 +01:00
```
2019-03-12 05:45:47 +01:00
All set, if you want to check the logs you can `pm2 logs lolisafe-api` or similar.