/Knowledge/sources/honojs__hono/llms-full/rpc-using-rpc-with-larger-applications--6fa6ad717f49.md
RPC: Using RPC with larger applications - hono-docs
RPC: Using RPC with larger applications Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt using rpc with...
RPC: Using RPC with larger applications
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#using-rpc-with-larger-applications
Summary
In the case of a larger application, such as the example mentioned in Building a larger application, you need to be careful about the type of inference. A simple way to do this...
Content
In the case of a larger application, such as the example mentioned in Building a larger application, you need to be careful about the type of inference. A simple way to do this is to chain the handlers so that the types are always inferred.
// authors.ts
import { Hono } from 'hono'
const app = new Hono()
.get('/', (c) => c.json('list authors'))
.post('/', (c) => c.json('create an author', 201))
.get('/:id', (c) => c.json(`get ${c.req.param('id')}`))
export default app
// books.ts
import { Hono } from 'hono'
const app = new Hono()
.get('/', (c) => c.json('list books'))
.post('/', (c) => c.json('create a book', 201))
.get('/:id', (c) => c.json(`get ${c.req.param('id')}`))
export default app
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#using-rpc-with-larger-applications",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / RPC > Using RPC with larger applications (1)",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 67,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "RPC: Using RPC with larger applications",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}