[nodejs] Re: Help with custom events emiter

2012-03-26 Thread Edgar Veiga
I wasn't getting the point on custom events. Thought it would work like observer pattern implementation in Django (commonly known as signals) byt it is slightly different. Thanks a lot mscdex! On Mar 26, 4:42 am, mscdex wrote: > On Mar 25, 10:19 pm, Edgar Veiga wrote: > > > I can't get why the

[nodejs] Re: Help with custom events emiter

2012-03-25 Thread mscdex
Also, on an unrelated note, line 24 should really go inside a callback to .listen() as a second argument, or inside an event handler for the server's 'listening' event. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines Y

[nodejs] Re: Help with custom events emiter

2012-03-25 Thread mscdex
On Mar 25, 10:19 pm, Edgar Veiga wrote: > I can't get why the listener declared on the cache.js file isn't making the > console.log everytime I make a request.. I'm not sure what you're expecting here. In cache.js you're creating a new instance of RequestHandler, adding a listener, and then doing