Or fork it...
TG_BOT_TOKEN=
TG_CHAT_ID=
- Init wrangler environment follow instructions on cloudflare
- Follow the instructions to init the instance under your account
- Update information in wrangler.toml
- Init using the scripts under src/database (locally first)
npx wrangler dev
You may need ngrok to proxy the traffic back to your local environment
To set the webhook mannually. Register from worker will be implemented in later phases.
https://api.telegram.org/bot{my_bot_token}/setWebhook?url={url_to_send_updates_to}
npx wrangler d1 execute counter --file=./src/database/01_init.sql
npx wrangler deploy