Aria's answer is great. This is an issue that confuses a lot of people coming from PHP. Try to remember: "there is no magic in node." If you want to scope something to one request, either use a local variable declared in the route function, or attach it to req as a property.
You can use global data intentionally for many useful things, like caching. -- 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/dba21953-3a7c-42c1-b7ec-b3a27f4b0d49%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
