Replies: 2 comments 1 reply
-
hello @kolodziejczak-sz Please advise on the use about const enhanceRes=(res)=>{...}. For example, I have a middleware array: I want the second middleware to send messages to the browser, while the third middleware does not execute. How to use enhancRes (res) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Also, please note that you can/should use a Proxy on apply. It automatically infers all types in typescript too! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
U can setup base middleware system smth like this:
Unfortunately, today's HttpResponse API doesnt provide easy way to check if response has finished.
For now you propably might want to override the res.end and res.tryEnd methods:
Originally posted by @kolodziejczak-sz in #483 (comment)
Beta Was this translation helpful? Give feedback.
All reactions