In this chapter, we have had a look at using modules, both CommonJS and AMD. We explored the syntax used for modularization, and showed how to both export and import modules. We then explored the use of AMD module syntax using the Require library, and discussed how to take care of module dependencies. We then explored the use of CommonJS module syntax, and showed the equivalent structure for module dependencies using SystemJS. Our journey continued with an in-depth discussion on Node and Express modules, where we put together a sample application to render both an index and a login page, and handle logins through session information. We then discussed how to set up and use a cloud-based execution environment for our code without the need for a server at all, as well as covering Amazon Web Services and AWS Lambda functions.
In the next chapter, we will tackle object-oriented...