Hey everyone.
Within my app, I have a global event object, so that all components of the app
can talk to one another. However, I have linked it to Redis - so I can not use
complex data when turning it into JSON. So I decided, that for pure internal
use, i’d add a sub-object that runs on middlewares.
Sadly, I couldn’t find any module that would get me booted with making my own
middleware based component.
Basically, I have a function that gets called before an important section of
the app. This function gets the object „data“. Now, some components from the
app want to modify this object and add or change something. So I want to be
able to do soemthing like this:
var MyG = require(… module that offers middleware functionality …)
MyG.use(function(data, next) {
// …
next();
});
MyG.use(…)
// Now within my important function:
function(data) {
MyG.run(data);
}
Is there any module that can solve this?
Kind regards, Ingwie.
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/CDA49906-8F5C-4AAB-8D1C-91A3EEF4786C%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.