Official Rewrite adapters to receive Webhooks in a simple, secure and fully typed way across popular Node.js frameworks and edge runtimes.
This monorepo contains the framework-first packages maintained by the Rewrite team, focused on DX, TypeScript first and good security practices.
You can find the full Webhooks documentation here.
@rewritetoday/elysiafor Elysia@rewritetoday/expressfor Express@rewritetoday/fastifyfor Fastify@rewritetoday/honofor Hono@rewritetoday/edgefor edge runtimes with the standardRequestandResponseAPIs
Each adapter has its own README with framework-specific examples: Elysia · Express · Fastify · Hono · Edge
Choose the adapter that matches your stack:
npm install @rewritetoday/hono hono
# ou
pnpm add @rewritetoday/hono hono
# ou
bun add @rewritetoday/hono honoimport { Hono } from 'hono';
import { Webhooks } from '@rewritetoday/hono';
const app = new Hono();
app.post(
'/webhooks/rewrite',
Webhooks({
secret: '...',
onPayload({ id, type, data }) {
console.log('Hey, a new webhook event:', type);
},
}),
);- Automatic webhook signature verification
- Secure webhook secret comparison
- Payload validated before reaching your handler
- No direct access to API key
Never expose your API key in webhooks.
Always use environment variables.
Made by the Rewrite team.
SMS the way it should be.