github honojs/hono v1.3.0

latest releases: v4.6.10, v4.6.9, v4.6.8...
2 years ago

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

Don't miss a new hono release

NewReleases is sending notifications on new releases.