I believe exposing code via `module.exports` is a right way to go, You
should use it when in doubt. I prefer it when I build libraries and
reusable components that should be robust and live well in the wild.
But, although it's good the `module.exports` way is too verbose for my
taste, so, in case of my own application, when I control the environment I
usually prefer more compact way - `globals.app = {}`, and later just use
this `app` as a globally accesible variable `app.settings = {}, app.MyClass
= fun(){}, ....`
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en