Skip to content

Commit

Permalink
Merge pull request #77 from daccess1/pm2Tutorial
Browse files Browse the repository at this point in the history
PM2 usage tutorial
  • Loading branch information
alfficcadenti authored Nov 10, 2021
2 parents 6d5e14f + 471b202 commit 6145d68
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,29 @@ Example:
- `SKIP_QUEST=life,snipe,neutral`


### Running bot as a daemon with PM2

To run your bot as a daemon (background process) you can use NPM package PM2. PM2 is daemon process manager, that works on Linux, MacOS, and Windows. To install PM2 globally, you need to run:

# `npm install pm2 -g`

To start a bot, do all the preparation steps from the above, but instead of `npm start`, run this:

`pm2 start index.js`

You can now run `pm2 list` command to see your bot up and running. It will automatically start on system startup now. You can control the bot with these commands:

`pm2 start <id>`

`pm2 stop <id>`

`pm2 restart <id>`

`pm2 delete <id>`

You can find more information on PM2 usage options at their [official webiste](https://pm2.keymetrics.io/).




## Local History backup (battlesGetData.js)
Expand Down

0 comments on commit 6145d68

Please sign in to comment.