Skip to content

connecting express middleware with own routes #539

Answered by RobinTail
HardCoreQual asked this question in Q&A
Discussion options

You must be logged in to vote

Wow. Thank you @HardCoreQual for showing this.

Instead all of that, I recommend to separate the actual routes from this UI by using attachRouting().
This approach is described here:
https://github.com/RobinTail/express-zod-api#connect-to-your-own-express-app

This way you wouldn't need to create fake endpoint.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by RobinTail
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