Skip to content

v0.4.0

Compare
Choose a tag to compare
@yusukebe yusukebe released this 16 Feb 02:10

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: yusukebe/hono@v0.3.8...v0.4.0