linnovate/meanio — pull request #24 by fracmak (2014-11-24 22:25:41+00:00)
Title: Decoupling DB Library from Modules Library

Libraries should be isolated from each other unless absolutely necessary. The event emitter is a lot better way to communicate between the libraries. This removes Meanio.createModels and Meanio.applyModels functions and instead replaces them with listeners on the existing "modulesEnabled" event and introduces a new "modelFound" event.

On a side note, is there a reason the lazy models are loaded on modulesEnabled instead of modulesFound? Seems like loading them there would cause fewer problems.