Closed kwhitley closed 3 months ago
This adds support for a few simple scenarios, while still requiring complex explanations/bypasses for more complex ones. In the end, that is likely not worth the bytes.
Closing this one for now until we are able to achieve the desired effect:
[ ] in a more universal way than I was able to achieve (e.g. normal route params should work in nested paths)
router.all('/:collection/*', collectionRouter) // should work without defining base path in child router
In the meantime, I was (sadly) unable to satisfactorily check all of those issues in the same attempt.
Description
This adds a new way to nest routers, by passing the entire router as a handler. With this method, child routers do not need explicit base paths set.
Notes
/child/:foo/*
. For that to work, specify the base path in the child router as before.Type of Change (select one and follow subtasks)