How to Declare Modules in Node.js

This article was originally written by Edwin Dalorzo at the Informatech CR Blog.

One of those aspects of Node.js that took me a while to fully understand initially is how to properly declare modules. At first it looks kind of obvious and intuitively simple, but later, you realize you can expose different types of objects like functions, constructors, properties or entire object instances. So I…