resourcepool / rainstorm

Apache License 2.0
1 stars 1 forks source link

Add a context to handle dao dependencies #38

Open Zacaria opened 8 years ago

Zacaria commented 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.

Zacaria commented 8 years ago

This article gives a good example of dependency injection https://blog.risingstack.com/dependency-injection-in-node-js/