With a growing list of services in use by this application, and more on the way, configuration is starting to get out of hand. The MongoDB connection is managed inside of the “bin/www” file, but the Amazon SDK configuration is handled elsewhere.
So, what happens when another chunk of code needs the Amazon SDK? And where do we put the next bit of configuration for yet another service that will be added to the application?
Application initialization has long been a troublesome topic for complex systems. But with one simple library, the majority of the initialization concerns can be handled in a very simple and re-usable manner.