Open Zacaria opened 8 years ago
In this file the dao is dynamicaly loaded when it's required here.
But ! This brings the dao into the route layer, which is ugly.
So, there should be a context initialized with the server, which will inject dependencies.
This article gives a good example of dependency injection https://blog.risingstack.com/dependency-injection-in-node-js/
In this file the dao is dynamicaly loaded when it's required here.
But ! This brings the dao into the route layer, which is ugly.
So, there should be a context initialized with the server, which will inject dependencies.