Sunday, 2 February 2020

Best way to structure a service in node.js/express?

Hello, recently I have started moving all the logic from my express routes, into a service provider. One of these routes deals with streams, not only that, but it also has to do some additional logic after the stream is finished. Because of this I am trying to find the most elegant solution of doing so, without passing res/req into the provider. I am not sure exactly how to post code on reddit, but i did post a more detailed question, with examples on stackoverflow here: https://stackoverflow.com/questions/60032651/best-way-to-structure-a-service-in-node-js-expressIf anyone could help point me into the right direction, it would be a big help.

Submitted February 03, 2020 at 03:14AM by subnub99

No comments:

Post a Comment