-
fork this repository
-
open vercel.com and create a new project
-
connect the project to your forked repository
-
set the environment variables.
If you don't have a bot yet, you can create one by talking to @BotFather on Telegram.
If you don't know the deployed URL, you can deploy the project first and then set the environment variables later.
BILIARCHIVER_WEBAPP=<THE_DEPLOYED_WEBAPP_URL> BILIARCHIVER_USERNAME=<THE_TELEGRAM_USERNAME_OF_BILIARCHIVER_BOT> BILIARCHIVER_API=<THE_API_URL_OF_BILIARCHIVER> BILIARCHIVER_BOT=<YOUR_BOT_TOKEN>
-
deploy
-
set the bot's webhook to the deployed URL. You can copy the link below and replace your bot's token and the deployed URL.
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/setWebhook?url=<DEPLOY_URL>/bot/webhook
-
clone this repository
-
install the dependencies
pnpm install
-
create a
.env
file and set the environment variables.BILIARCHIVER_WEBAPP=<THE_DEPLOYED_WEBAPP_URL> BILIARCHIVER_USERNAME=<THE_TELEGRAM_USERNAME_OF_BILIARCHIVER_BOT> BILIARCHIVER_API=<THE_API_URL_OF_BILIARCHIVER> BILIARCHIVER_BOT=<YOUR_BOT_TOKEN>
-
start the development server
pnpm dev
-
set the bot's webhook to the deployed URL.
You may use ngrok to expose your local server to the internet, or open the port 5173 on your router or the VPS. Then you can copy the link below and replace your bot's token and the deployed URL.
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/setWebhook?url=<DEPLOY_URL>/bot/webhook