How To Create a Node.js Module
In Node.js, a module is a collection of JavaScript functions and objects that can be used by external applications. In this tutorial, you will create a Node.js module organized with npm that suggests what color web developers should use in their designs. You will develop the module by storing the colors as an array, and providing a function to retrieve one randomly. Afterwards, you will run through various ways of exporting and importing a module into a Node.js application.