Telegram Bot Template for Vercel
1. Install Vercel CLI
npm i -g vercel
2. Install CloudFlare tunnel (cloudflared
)
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
- api/telegram.mjs — Endpoint function for WebHooks
- api/setWebhook.mjs — Function for setting WebHook URL
P.S. Don't forget to remove or restrict api/setWebhook.mjs function before going to production
Made with 💜 by Vladislav Ponomarev