My question is if there is a way to add some logic that leverages the close event of the response (docs). My use case is logging a summary of the request/response like so:
It seems as soon as the response is returned that the server code stops executing and no logs are emitting (though they do when running the express app locally). Is this just an inherent limitation of running Express on Lambda? If so, any suggestions for being able to log a "summary" of the request/response?
After browsing through the source code a little (notably finish.js), I noticed you did have support for a few events (error, end, and finish). I switched to using finish and that did work as expected.
Hi there - first, thanks for all your work.
My question is if there is a way to add some logic that leverages the
close
event of the response (docs). My use case is logging a summary of the request/response like so:It seems as soon as the response is returned that the server code stops executing and no logs are emitting (though they do when running the express app locally). Is this just an inherent limitation of running Express on Lambda? If so, any suggestions for being able to log a "summary" of the request/response?
Thanks!