Universal webhook callback builder supporting Express, Fastify, Fetch (Next.js), and Node.js http.
http
The Application instance.
The target web framework (default: "express").
"express"
Webhook configuration options.
Framework-specific webhook callback handler.
// Expressapp.use("/webhook", webhookCallback(botApp, "express"));// Next.js App Router (app/api/webhook/route.ts)export const POST = webhookCallback(botApp, "nextjs"); Copy
// Expressapp.use("/webhook", webhookCallback(botApp, "express"));// Next.js App Router (app/api/webhook/route.ts)export const POST = webhookCallback(botApp, "nextjs");
Universal webhook callback builder supporting Express, Fastify, Fetch (Next.js), and Node.js
http.