When you start working with WebPack for GameTime, you'll notice that you can't just define a variable in one file and find it in another as easily as you can in Rails.
Read Node.js, Require and Exports and Organize Your Code with RequireJS
- Modules are small chunks of your application that serve a specific purpose (cite: 2nd article). It's basically a group of functions/variables that are related and belong in their own separate file. I think of it like a class but I don't know if that's technically the right way to think of it.
- The second article is using RequireJS. Seems to wrap modules in functions where the arguments are the dependencies and then can be referenced in the module by the assigned variables (after the define part associates the files with the variables names).