Hey r/node,I was wondering what the best practice is for creating routes that are used as child routes and main routes. For example, imagine you have:api/schoolapi/school/:id/courses <--- child routes......api/courses <--- new parent routeapi/courses/:id.....Would I use a single router for both the child router and parent router, or separate the routers? The child router would utilize the school id (mergeParams), but the parent router doesn't require the school id in the example.
Submitted February 03, 2019 at 05:19PM by Nehalpatel30
No comments:
Post a Comment