PM2-Telegram-bot
PM2-Telegram-bot copied to clipboard
Node.js bot that let you control PM2 with Telegram
PM2-Telegram-bot
This bot let you control PM2 with Telegram
How to install
- Clone the repository in the same computer/server where pm2 is running
- Run
npm install
in the same directory as the project files to install all the dependencies then runnpm run build
- you have two options to run the bot:
- Set the token that @botFather gave you as an environment variable and then run
node bot.js
:
TOKEN=SuPeRfAlSeToKeN pm2 start ./dist/app.js
- Open
config.json
and add the telegram token that @botFather gave you and then runpm2 start config.json
:
"TOKEN": "",
Usage
For now there are only two commands available, list and restart.
/list, /ls
List all the processes that pm2 is managing
/restart
Let you restart or start a process by the name or the id, you can also use all
to restart all the proccesses.