0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-25 13:19:30 +01:00
hono/examples
Yusuke Wada c5cc9f25a6
feat: nested route (#105)
# BREAKING CHANGES!!!

`app.route` is changed:

**Chained route** is obsolete:

```
app.route('/')
  .get((c) => c.text('get /'))
// ^^^ Not working now!!
```

Now, `app.route` enables **nested route**:

```
const book = app.route('/book')
book.get('/', (c) => c.text('List books')) // => GET /book
book.get('/:id', (c) => {
  return c.text('Get Book: ' + c.req.param('id'))) // => GET /book/:id
})
```
2022-02-16 11:06:22 +09:00
..
basic feat: nested route (#105) 2022-02-16 11:06:22 +09:00
blog chore(example): update miniflare version 2022-02-10 20:54:54 +09:00
compute-at-edge feat: Basic-auth with polyfill (#86) 2022-02-03 08:40:20 +09:00
durable-objects chore: update examples (#101) 2022-02-12 14:45:29 +09:00
jsx-ssr chore: update examples (#101) 2022-02-12 14:45:29 +09:00
mustache chore: update examples (#101) 2022-02-12 14:45:29 +09:00
serve-static chore: update examples (#101) 2022-02-12 14:45:29 +09:00