25 examples · 1 npm dependency · 5 runtimes
Every Hono example, ported to HBForge.
All 25 examples from hono.dev/examples rewritten with HBForge's WebApp + sibling modules. Each has its own deep-dive page with full code, an explanation, runtime notes, related modules, and a link to the Hono original.
25/25examples
1install
0adapter packages
5runtimes
Applications
Applications
7 examples
01
Web API
A minimal REST API: list, get, create, update, delete. State is in-memory; swap for forge/data to back it with Postgres/SQLite.
02
Proxy
Forward every request under /api/* to another origin, preserving method, headers, query string and body.
03
File upload
Accept multipart/form-data uploads, read the file as a Web Standards File object, persist to disk.
04
Bind a reverse proxy
When deployed behind nginx / Caddy / Cloudflare, reconstruct the original URL from X-Forwarded-Proto and X-Forwarded-Host.
05
Error handling in Validator
Validate request bodies with HBForge's built-in schema builder — Zod-like fluent API, zero dependencies.
06
Grouping routes for RPC
Each sub-app has its own router and middleware. app.route() composes them into a single tree without runtime overhead.
07
CBOR
Read and write application/cbor. c.body() accepts a Uint8Array directly so you can return raw binary without encoding tricks.
Docs / OpenAPI
Docs / OpenAPI
5 examples
08
Zod OpenAPI
HBForge's schema builder is Zod-compatible by API — generateOpenAPI31() walks the router and produces a full spec from it.
09
Hono OpenAPI
One function call generates the spec by reflecting on the router. No DSL, no annotations.
10
Swagger UI
swaggerUI({ url }) returns a complete HTML page wired to the Swagger UI CDN — drop in one route.
11
Scalar
Use Scalar's beautiful API reference instead of Swagger UI. The html`` tagged template auto-escapes interpolation; raw() opts out.
12
Hono Docs Generator
Bake the OpenAPI spec to disk during build. Plug into a docs deploy pipeline for git-tracked, diffable API contracts.
Integrations
Integrations
13 examples
13
Cloudflare Durable Objects
Stateful primitives on the edge. c.env exposes the binding; the Durable Object class exports next to the app.
14
Cloudflare Queue
Enqueue work over HTTP, consume in the same Worker via a queue() handler.
15
Cloudflare Testing
Because app.fetch takes a Request and returns a Response, the entire app is testable in-process with zero infrastructure.
16
Remix
Mount Remix's universal request handler under a wildcard. c.req.raw is the underlying Request — pass it through.
17
htmx
Server-rendered HTML, no client framework, no build step.
18
Stripe Webhook
Verify the stripe-signature header against the raw body. c.req.text() caches the body, so later .json() calls don't throw.
19
Prisma on Cloudflare
Use Prisma's edge client, or skip the dep entirely with forge/data. Same connection pooling, query builder, migrations — built in.
20
Better Auth
forge/auth ships Password, JWT, SessionManager, OAuth2 PKCE, TOTP, WebAuthn, RBAC, ApiKeyAuth, BackupCodes, AdaptiveMFA — 34 APIs,.
21
Better Auth on Cloudflare
Same forge/auth module, exported as a CF Workers entrypoint. JWT.sign and Password.
22
Pylon (GraphQL)
Pylon is Hono's GraphQL adapter. forge/server ships GraphQLEngine directly: schema + resolvers + DataLoader, no separate package.
23
Stytch Authentication
Forward to Stytch's API. Or use forge/auth's MagicLink, TOTP, BackupCodes if you'd rather not depend on a vendor.
24
Auth.js
Mount Auth.js's universal handler under a wildcard. c.req.raw is the underlying Request; Auth.
25
Apitally (Monitoring)
Built-in webLogger() covers basics; forge/trace gives OpenTelemetry-compatible distributed tracing.
One package. Every example.
Every example above runs on the same @hyperbridge/forge install. No adapters, no second package for the Node listener, no per-runtime forks.