Better-Notify for Hono
Better-Notify works anywhere Hono does — Cloudflare Workers, Deno, Bun, or Node.js. Both libraries are ESM-first, TypeScript-native, and designed for edge runtimes.
Why it fits
- ESM-only — matches Hono's module system
- Runs on Cloudflare Workers, Deno, Bun, Node.js
- Lightweight — no heavy dependencies for edge
- Cloudflare Email transport for edge-native delivery
Example
src/index.ts
import { Hono } from 'hono';
import { mail } from './lib/notifications';
const app = new Hono();
app.post('/contact', async (c) => {
const { email, message } = await c.req.json();
await mail.contactForm.send({
to: 'support@example.com',
input: { from: email, message },
});
return c.json({ sent: true });
});
export default app;