Multiple routers
shailsharma opened this issue · comments
shailsharma commented
How to configure & use multiple routers?
const router1 = router(
get('/hello/:who', hello)
);
const router2 = router(
get('/hello1/:testing', testingFn)
)
Pedro Nauck commented
So, I trying to figure out what you can do. Why do you have two same routes with different handlers?
I think that each microservice can have just one router, if you want to have two routers for an one microservice, you need to split it.
shailsharma commented
ohh sorry. updated the snippet.
Pedro Nauck commented
You can do like shows here
const service = route(
get('/hello/:who', hello),
get('/hello1/:testing', testingFn)
)