Closed socketopp closed 1 year ago
Just tried out HonoJS before itty-router. HonoJS supported grouping
const book = new Hono() book.get('/', (c) => c.text('List Books')) // GET /book book.get('/:id', (c) => { // GET /book/:id const id = c.req.param('id') return c.text('Get Book: ' + id) }) book.post('/', (c) => c.text('Create Book')) // POST /book const app = new Hono() app.route('/book', book)
Couldn't find it in this itty-routers documentation, is that something that is supported?
I thought it was a nice features because you can better divide your routes into different files.
Update Found the answer I was looking for! https://github.com/kwhitley/itty-router/issues/110
Yep! It does require that subroutes be aware of (and prefix base appropriately) the final url, but otherwise, no issues!
base
Just tried out HonoJS before itty-router. HonoJS supported grouping
Couldn't find it in this itty-routers documentation, is that something that is supported?
I thought it was a nice features because you can better divide your routes into different files.
Update Found the answer I was looking for! https://github.com/kwhitley/itty-router/issues/110