/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-grouping-ordering-deeae9ac10d3-grouping-ordering-s0604-c0000.md
Grouping ordering - hono-docs
Grouping ordering Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt grouping ordering Summary Note...
Grouping ordering
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#grouping-ordering
Summary
Note that the mistake of grouping routings is hard to notice. The route() function takes the stored routing from the second argument (such as three or two) and adds it to its own (two or app) routing. ```ts three.get('/hi', (c)...
Content
Note that the mistake of grouping routings is hard to notice.
The route() function takes the stored routing from the second argument (such as three or two) and adds it to its own (two or app) routing.
three.get('/hi', (c) => c.text('hi'))
two.route('/three', three)
app.route('/two', two)
export default appIt will return 200 response.
GET /two/three/hi ---> `hi`However, if they are in the wrong order, it will return a 404.
import { Hono } from 'hono'
const app = new Hono()
const two = new Hono()
const three = new Hono()
// ---cut---
three.get('/hi', (c) => c.text('hi'))
app.route('/two', two) // `two` does not have routes
two.route('/three', three)
export default appGET /two/three/hi ---> 404 Not Found