Vercel Edge Functions
Telegram Bot Template forThis is an experimental version, we are open to your feedback โจ
Run locally
Vercel CLI
1. Installnpm i -g vercel
CloudFlare tunnel (cloudflared
)
2. Install
3. Then run local dev server with tunnel
npm run dev-with-tunnel
And open link from terminal (ends with *.trycloudflare.com
) to set WebHook
Now you can make some changes in src/bot.mjs
Template structure:
- api/telegram.mjs โ Endpoint function for WebHooks
- api/setWebhook.mjs โ Function for setting WebHook URL
api/setWebhook.mjs function before going to production
P.S. Don't forget to remove or restrictMade with ๐ by Vladislav Ponomarev