You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since both client and server are written in CoffeeScript (JavaScript) it makes sense to share code between the two. Node already supports the CommonJS standard (require(), exports etc.), but browsers don't. On the clientside we therefore use https://github.com/sstephenson/stitch which allows us to use the exact same code and functions as under Node.
In CommonJS each file is a module and completely separated from the other modules. Modules interact with each other through exports and require(). A typical module will export a single class: