/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-using-with-index-pa-3e91eca4747a-using-with-index-parameter-s0734-c0000.md

Using with index parameter - hono-docs

Using with index parameter Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt using with index param...

Using with index parameter

Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#using-with-index-parameter

Summary

You can optionally pass an index parameter to get the route path at a specific position, similar to Array.prototype.at(). ```ts app.all('/api/*', (c, next) => { return next() }) app.get('/api/users/:id', (c) => { console.log(routePath(...

Content

You can optionally pass an index parameter to get the route path at a specific position, similar to Array.prototype.at().

app.all('/api/*', (c, next) => {
  return next()
})

app.get('/api/users/:id', (c) => {
  console.log(routePath(c, 0)) // '/api/*' (first matched route)
  console.log(routePath(c, -1)) // '/api/users/:id' (last matched route)
  return c.text('User details')
})
Kinic Wiki
Loading knowledge node
Details

Identity

database
db_23dhmsxlhukv
database_id
db_23dhmsxlhukv
path
/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-using-with-index-pa-3e91eca4747a-using-with-index-parameter-s0734-c0000.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.