Integrations
Hono
Use Katman with Hono on any runtime — Node.js, Bun, Deno, Cloudflare Workers.
Hono is a fast web framework that runs everywhere. Katman's Hono adapter mounts your procedures as a Hono handler.
Setup
import { } from "hono"
import { } from "katman/hono"
const = new ()
// Existing routes
.("/api/health", () => .({ : "ok" }))
// Katman RPC
.("/rpc/*", (appRouter, {
: () => ({
: getDB(),
: .get("user"),
}),
}))
export default Context from Hono
The context function receives Hono's Context object. Access middleware data via c.get():
katmanHono(appRouter, {
: () => ({
: .get("user"), // from Hono middleware
: .get("requestId"),
: .env, // Cloudflare Workers bindings
}),
})Cloudflare Workers
import { } from "hono"
import { } from "katman/hono"
const = new ()
.("/rpc/*", (appRouter, {
: () => ({ : .env.DB }),
}))
export default What's next?
- Server — standalone
serve()as an alternative - Integrations — other available integrations