grammyjs / grammyjs/website

Add example code for every single framework adapter

Open
#993 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
52
Forks
138
PR merge metrics
No merged PRs in 30d

Description

The [example](https://grammy.dev/guide/deployment-types#how-to-use-webhooks) below doesn't contains all info about how dev can setup webhooks. Would be nice to provide more clear example for this:
![image](https://github.com/grammyjs/grammY/assets/18114189/e7f72e8d-fc1b-4d64-b61c-70150d6aadd7)

for example:
```
import express from 'express';
import { Bot, webhookCallback } from 'grammy';

const app = express();
app.use(express.json());

const bot = new Bot(process.env.TELEGRAM_BOT_TOKEN);
await bot.api.setWebhook('https://base_server_url');

bot.on('message', async (ctx) => { ... });

app.use(webhookCallback(bot, 'express'));
app.listen(8080);
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.