Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kjs222/766660d2d4ef2a4c8f7ad6654a1baf85 to your computer and use it in GitHub Desktop.
Save kjs222/766660d2d4ef2a4c8f7ad6654a1baf85 to your computer and use it in GitHub Desktop.

Deliverable

  • 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment