- Read [Node.js, Require and Exports][rblog] and [Organize Your Code with RequireJS][rblog2]
- Fork This Gist
- Respond in your forked gist with answers to the following questions
In the context of Node, what is a module?
- It's a block of code that you've bundled together. By using module exports you can decide what aspects to make available to other files (or make all of it accessible).
The code examples from the second blog post look very different from the first. Why?
- The second blog post uses a library called RequireJS to accomplish this same goal; whereas the first relies on CommonJS which may be Node's default.