075489edd1
Removes [cacheable-request](https://github.com/jaredwray/cacheable-request). It's no longer used after updating ancestor dependency [nodemon](https://github.com/remy/nodemon). These dependencies need to be updated together. Removes `cacheable-request` Updates `nodemon` from 2.0.15 to 2.0.20 - [Release notes](https://github.com/remy/nodemon/releases) - [Commits](https://github.com/remy/nodemon/compare/v2.0.15...v2.0.20) --- updated-dependencies: - dependency-name: cacheable-request dependency-type: indirect - dependency-name: nodemon dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> |
||
---|---|---|
src | ||
.env.sample | ||
.gitignore | ||
Dockerfile | ||
LICENSE | ||
README.md | ||
docker-compose.yml | ||
package-lock.json | ||
package.json | ||
test-publish.js |
README.md
NotificamBot
Telegram bot to receive notifications reads from a queue (pub/sub on Redis).
Configuration
Rename .env.sample in .env and configure it:
KEY | DESCRIPTION |
---|---|
BOT_TOKEN | Telegram Bot Token created with @BotFather |
CHAT_ID | Your chat id with the bot (you can configure this after the first launch of the bot from client) |
REDIS_CHANELL | Channel where the bot reads |
REDIS_HOST | Host redis (don't touch if you use docker-compose). |
REDIS_PASSWORD | Redis password |
Usage
- Clone the project with
git clone https://github.com/franjsco/NotificamBot.git
- Build docker image and run it with docker-compose:
docker-compose up --build
- Search your bot on telegram and start it. The chat id will be displayed on the terminal. Copy it into .env and stop (CTRL+C) and start containers.
docker-compose up
- Now you can perform a test.
node test-publish.js
- You can send notifications to the bot by connecting to the container redis instance from any application and post messages to the configured queue.