/Knowledge/sources/honojs__hono/llms-full/routing-grouping-ordering--f6487278fea8.md

Routing: Grouping ordering - hono-docs

Routing: Grouping ordering Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt grouping ordering Summary N...

Routing: Grouping ordering

Source evidence: /Sources/honojs__hono/provenance.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 app

It 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 app
GET /two/three/hi ---> 404 Not Found

Metadata

{
  "chunk_index": 0,
  "citation": "https://hono.dev/llms-full.txt#grouping-ordering",
  "coverage_role": "overview",
  "qualified_title": "Hono / llms-full / Routing > Grouping ordering",
  "retrieved_at": "2026-07-02T05:51:01Z",
  "section_index": 604,
  "source_id": "/honojs/hono",
  "source_type": "llms_full",
  "target_label": "llms-full",
  "title": "Routing: Grouping ordering",
  "upstream_url": "https://hono.dev/llms-full.txt",
  "version": "2026"
}
Kinic Wiki
Loading knowledge node
Details

Identity

database
db_23dhmsxlhukv
database_id
db_23dhmsxlhukv
path
/Knowledge/sources/honojs__hono/llms-full/routing-grouping-ordering--f6487278fea8.md
kind
directory
role
markdown_note
children
0

Metadata

created_at
virtual
updated_at
virtual
etag
virtual
metadata_json
{}

Lint Hints

No lightweight warnings.

Outgoing Links

No outgoing links indexed.

Incoming Links

Select a file node to inspect backlinks.

Raw Source

No raw source path inferred.