https://github.com/skywinder/telegram-bot-node-and-heroku_worker
https://github.com/skywinder/telegram-bot-node-and-heroku_worker
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/skywinder/telegram-bot-node-and-heroku_worker
- Owner: skywinder
- Created: 2020-02-26T07:50:51.000Z (over 5 years ago)
- Default Branch: worker
- Last Pushed: 2022-12-07T12:39:56.000Z (over 2 years ago)
- Last Synced: 2025-01-20T13:21:22.832Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 2.5 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Telegram Bot coded in NodeJS hosted at Heroku
Sample files to run a Telegram Bot with Heroku without [dyno sleeping](https://blog.heroku.com/app_sleeping_on_heroku).## Requirements
* [NodeJS (and npm)](https://nodejs.org/en/)
* [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli)
* [node-telegram-bot-api](https://github.com/yagop/node-telegram-bot-api)
* [Bot token](https://web.telegram.org/#/im?p=@BotFather)## References
* [Heroku NodeJS Documentation](https://devcenter.heroku.com/articles/getting-started-with-nodejs#introduction)
* [node-telegram-bot-api Documentation](https://github.com/yagop/node-telegram-bot-api/blob/master/doc/usage.md)---
Make sure to run `npm install` before commiting your bot to Heroku.
---
## Prevent Dyno sleeping
By default, Heroku apps sleep after 1 hour of inactivity. This can be prevented by running the app as a worker dyno instead of a web dyno. This is already set on the Procfile, but make sure this is also true on your dashboard.
1. Go to your [Heroku dashboard]
2. Resources tab

3. Check worker, uncheck web (if it's checked)
