BREAKING CHANGES!!!!
Route
is deprecated. Removed. To group routes, use Hono
instead of Route
.
// const api = new Route() <--- obsolete
const api = new Hono()
api.get('/posts', (c) => c.text('list'))
api.post('/posts', (c) => c.text('create'))
app.route('/v1', api)
Another feature
You can get all param
or all query
at one.
app.get('/posts/:id', (c) => {
const { id } = c.req.param()
const { q, lang } = c.req.query()
...
}))
Thanks to @usualoma
What's Changed
- fix(url): fix about merging path by @yusukebe in #235
- Tweaks return values of functions for request parameters. by @usualoma in #234
- feat: [BREAKING] deprecate
Route
, useHono
instead by @yusukebe in #237 - docs: update readme by @yusukebe in #238
- for v1.3.0 by @yusukebe in #239
Full Changelog: v1.2.2...v1.3.0