I am writing a web crawler for reddit which only allows 1 request every 2 seconds and would like to use recursion to make the requests. After the series of get requests for 1 persons comments are complete, I would like to emit to show completion and call the comments again on the next username in a message queue. The problem is whenever I am more than one level deep I get a "TypeError: Object # has no method 'emit'".
I am also open for better ways to do this, I have just started learning node and am sure there are much better ways to accomplish this.
I have posted my code in the gist below...any help would be awesome!