Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrmarble/pm2-telegram-bot
Node.js bot that let you control PM2 with Telegram
https://github.com/mrmarble/pm2-telegram-bot
nodejs pm2 telegram telegram-bot
Last synced: about 2 months ago
JSON representation
Node.js bot that let you control PM2 with Telegram
- Host: GitHub
- URL: https://github.com/mrmarble/pm2-telegram-bot
- Owner: MrMarble
- License: mit
- Created: 2018-08-15T21:21:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T11:12:07.000Z (about 2 years ago)
- Last Synced: 2024-05-01T16:50:27.384Z (8 months ago)
- Topics: nodejs, pm2, telegram, telegram-bot
- Language: JavaScript
- Size: 793 KB
- Stars: 22
- Watchers: 3
- Forks: 8
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PM2-Telegram-bot
This bot let you control [PM2](https://pm2.io/doc/) with Telegram## How to install
1. Clone the repository in the same computer/server where pm2 is running
2. Run `npm install` in the same directory as the project files to install all the dependencies then run `npm run build`
3. you have two options to run the bot:
1. Set the token that [@botFather](https://t.me/BotFather) gave you as an environment variable and then run `node bot.js`:
```bash
TOKEN=SuPeRfAlSeToKeN pm2 start ./dist/app.js
```
2. Open `config.json` and add the telegram token that [@botFather](https://t.me/BotFather) gave you and then run `pm2 start config.json`:
```json
"TOKEN": "",
```## Usage
For now there are only two commands available, list and restart.### /list, /ls
List all the processes that pm2 is managing
![](assets/markdown-img-paste-20180819124409749.png) ![](assets/markdown-img-paste-20180819124449325.png)
### /restart
Let you restart or start a process by the name or the id, you can also use `all` to restart all the proccesses.![](assets/markdown-img-paste-2018081912521625.png)