Install dependencies:
pnpm install
Creat .env
file with:
Configuration Key | Description |
---|---|
BOT_TOKEN |
Required: The authentication token obtained from @BotFather. |
NODE_ENV |
Required: production or development . |
HOST |
Url for linking with bot. |
WEB_APP |
Url for Telegram Web App. Forwarding by ngrok |
Navigate to api
folder:
cd api
Run bot:
pnpm build:watch
pnpm server:watch
or
pnpm dev
For linking bot with Telegram:
pnpm run link
Respectively for unlinking:
pnpm run unlink
Run front app in the development mode:
pnpm dev
For preview in Telegram:
- go to ngrok
- after registration, get
authtoken
- in
app
folder, createngrok.yml
file withauthtoken
pnpm expose