You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constbook=newHono()book.get('/',(c)=>c.text('List Books'))// GET /bookbook.get('/:id',(c)=>{// GET /book/:idconstid=c.req.param('id')returnc.text('Get Book: '+id)})book.post('/',(c)=>c.text('Create Book'))// POST /bookconstapp=newHono()app.route('/book',book)
The current routing grouping for running multiple Hono initialization methods is not very intuitive. I think we can attach a group method to the instance and return child instance, like this:
constapp=newHono()constbookStore=app.group('/book_store')bookStore.get('/:id',(c)=>{constid=c.req.param('id')returnc.text('Get Book Store: '+id)})constbook=bookStore.group('/book')...
The text was updated successfully, but these errors were encountered:
What is the feature you are proposing?
The current routing grouping for running multiple Hono initialization methods is not very intuitive. I think we can attach a
group
method to the instance and return child instance, like this:The text was updated successfully, but these errors were encountered: