How (not) to create a singleton in Node.js
Iain Collins
9728

https://medium.com/@iaincollins/how-not-to-create-a-singleton-in-node-js-bd7fde5361f5
Hello,

Thanks for the post !

Another smart solution is a to use a dependency injection framework,

I coded Di-Ninja for this

https://github.com/di-ninja/di-ninja

It’s full featured and is the only one, as I know, that implement the smart Composition-Root design pattern

It’s working on server and browser