Choosing a Server
Typeweaver currently has two main server integration paths: the dependency-free server plugin and the hono plugin. This guide helps you choose the right generated server output for a new API or an existing Hono app.
Those are the first-class server integrations covered by the current 0.10.x docs. If you need a different framework shape, build on top of the generated artifacts rather than looking for another built-in adapter here.
If you are starting fresh, choose the server plugin by default. If you already use Hono or want its middleware ecosystem, choose the Hono plugin.
Quick comparison
| Option | Best for | Generated artifacts | Why choose it |
|---|---|---|---|
server plugin | New zero-dependency setups | <ResourceName>Router, TypeweaverApp | Fetch API-native, dependency-free, good default |
hono plugin | Existing Hono apps or teams that want Hono middleware | <ResourceName>Hono | Fits naturally into a Hono codebase |
Choose the server plugin when
- you want a zero-dependency server setup
- you want Fetch API-native primitives
- you are building for environments where a lightweight default is useful
- you want generated routers plus
TypeweaverApp
This is the best starting point for a new todo API if you do not already have framework constraints.
Choose the Hono plugin when
- your app already uses Hono
- your team wants Hono's middleware ecosystem
- you want the generated output to fit directly into an existing Hono runtime shape
For a Hono project, the generated <ResourceName>Hono artifact is usually the smoothest path.
Practical recommendation
For a first Typeweaver project:
- start with
clients,serverif you are building from scratch - start with
clients,honoif your server is already Hono
Both paths keep your handlers tied to the same spec. The difference is mostly how much framework structure you want around them.