npm hono 1.3.0
v1.3.0

latest releases: 4.6.2, 4.6.1, 4.6.0...
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.