Created
January 22, 2013 16:53
-
-
Save groundwater/4596218 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// you can omit DI for _light_ dependencies | |
var async = require('async'); | |
module.exports.inject = function( dependencies ){ | |
// no direct require of _heavy_ dependencies | |
var mysql = dependencies.mysql; | |
var redis = dependencies.redis; | |
// do whatever | |
return // some presistence object | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Each module in the application follows the same design.
Your
server.js
file can assemble the ensemble with: