- Fork the Repo
- Clone repo in your local workspace
git clone <repo_url>
- Track origin/dev branch
git branch dev
- Create new feature branch
git checkout -b new-feature-branch
- Commit your change
git commit -m "message"
- Push your change
git push origin new-feature-branch
- Create Pull Request using UI
Reference: https://www.youtube.com/watch?v=8lGpZkjnkt4&ab_channel=Fireship
- Node.js 16+. Recommended to use nvm to get the specific Node.js version. Package managers often don't have newer versions.
- Yarn
To use the Telegram Bot API, you first have to get a bot account by chatting with BotFather.
BotFather will give you a token, something like 123456789:AbCdfGhIJKlmNoQQRsTUVwxyZ
.
Put it in a file named .env
:
BOT_TOKEN=123456789:AbCdfGhIJKlmNoQQRsTUVwxyZ
(optional: you can also specify a port for the server in .env
)
PORT=5000
yarn install
yarn start
yarn lint
...and fix (some of the) lint errors
yarn lint-fix
Set following variables in your production environment:
BOT_TOKEN
: Same as aboveWEBHOOK_DOMAIN
: Domain of your web server. It be running on port 80 and support HTTPS. Example value:mydomain.com