github honojs/hono v0.4.0

latest releases: v4.4.11, v4.4.10, v4.5.0-rc.2...
2 years ago

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
})

What's Changed

Full Changelog: v0.3.8...v0.4.0

Don't miss a new hono release

NewReleases is sending notifications on new releases.