Simple REST API to send a message to a specific chat via Telegram Bot
Hint:
You can get your telegram chat id using @userinfobot (https://github.com/nadam/userinfobot).
| Variable | Description |
|---|---|
BOT_TOKEN |
Token that identifies the Bot |
CHAT_ID |
Id of user which send the message to |
PORT |
API port number |
Create a network named backend (to be shared with other nodes)
docker network create backendRun
npm run deployOr
npm run deploy:onlyNote
There are no exposed ports in the docker compose configuration file
Run via NPM
npm install
npm startReach REST server at http://localhost:8000/ using method GET
| Field | Description |
|---|---|
message |
The message to send |
Example:
curl -G --data-urlencode 'message=bots are awesome!' http://localhost:8000