Skip to content

v1.3.0

Compare
Choose a tag to compare
@yusukebe yusukebe released this 16 May 13:26

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

Full Changelog: v1.2.2...v1.3.0