Deploy your Telegram bot to Vercel.
It is strongly recommended to use degit to clone this repository. It will delete README.md and degit.json file when clone.
- Clone the template repo & Initialize git repository.
degit git@github.com:Lmmmmmm-bb/vercel-telegram-bot.git my-project
git init
- Install Dependencies.
pnpm i
- Start dev server & Set your bot webhook to develop server that ngrok provides.
pnpm start
pnpm serve # open dev serve by ngrok
- Copy
.env.example
to.env
. Do not upload.env
file to your repository. - Setup bot token, webhook domain & path.
- Setup Vercel project.
- Setup your project Environment Variables in Vercel. Same as your
.env
file. - After deploy success, set bot webhook url.