You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can simply move the side-logic execution to a promise but don't await for it while responding the HTTP request. You don't need to work directly with the request object to send the response. After invoking the promise, just return the value as you do normally so routing-controller handles it. Later Node.js continues executing your promise.
I'd like to execute some logic after my controller returns a response. Since this logic does not impact the result, I'd like to return first, so the client can receive the response asap, and then run this additional logic Something like https://stackoverflow.com/questions/16180502/why-can-i-execute-code-after-res-send
The problem: It's not clear to me how to achieve this with this library
The text was updated successfully, but these errors were encountered: