Created
July 15, 2014 16:22
-
-
Save tdharris/bcd8b0b597614f31fadb to your computer and use it in GitHub Desktop.
This file contains 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
// How to expose a global handler for my requestHandler to reach? | |
module.exports = handler = []; | |
exports.addToHandler = function(key, newFunction) { | |
handler[key] = newFunction; | |
} | |
// To handle things from my requestHandler, I'm thinking: | |
var handler = require('./taskHandler'); | |
handler.addToHandler('processMail', function() { | |
// magic happens here... | |
}); | |
handler[requestKey, params](); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment