Closed Obiwarn closed 7 years ago
Hello @obiwarn, the service, controller paradigm crops up in many languages and frameworks e.g. playframework, spring, ruby on rails. In the case, of express-no-stress, it remains relatively un-opinionated. It leaves it up the developer to choose a path. Hence, why the example controller and service is so simple.
I personally like the paradigm. Hence why the example is as such. It ensures loose coupling between your services and your routing/controller layer. This makes it easy to test services independently. They become more portable and can be extracted into a standalone library.
Could you recommend some links / info about the folder structure and Service / Controller / Router architecture you are using in the project? How do you expand this to larger projects?