Skip to content

How to construct API with 20+ route handlers? #585

Closed Answered by sukovanej
jpaju asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, good point 👍. I added RouterBuilder.merge.

const app = RouterBuilder.merge(routerBuilder1, routerBuilder2).pipe(RouterBuilder.build)

// or

const app = routerBuilder1.pipe(
  RouterBuilder.merge(routerBuilder2),
  RouterBuilder.merge(routerBuilder3),
  ...,
  RouterBuilder.build
)

You can use check the tests or docs

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jpaju
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants