v2.6.0
What's Changed
You can now use .route()
to have nested routers, and .all()
to have a class handle all HTTP methods
const authors = fromHono(new Hono())
.get('/', ListAuthors)
.post('/', CreateAuthor)
.get('/:id', GetAuthor)
const books = fromHono(new Hono())
.get('/', ListBooks)
.post('/', CreateBook)
.get('/:id', GetBook)
const app = fromHono(new Hono())
app.route('/authors', authors)
app.route('/books', books)
app.all('/events', EventsCatchAll) // .all() will not register any method in the openapi schema
export default app;
Full Changelog: v2.5.4...v2.6.0