Chapter 1. Welcome to Node.js
Figure 1.1. Asynchronous and nonblocking components in a Node application
Figure 1.2. The event loop
Figure 1.3. Node’s software stack
Chapter 2. Node programming fundamentals
Figure 2.1. Navigating your code is easier if you organize it into directories and separate files rather than keeping your application in one long file.
Figure 2.2. The population of the module.exports property or the exports object allows a module to select what should be shared with the application.
Figure 2.3. Node modules can be created by using either files (example 1) or directories (example 2).
Figure 2.4. When you put ./ at the beginning of a module require, Node will look in the same directory as the program file being executed.
Figure 2.5. Steps to finding a module
Figure 2.6. The package.json file, when placed in a module directory, allows you to define your module by using a file other than index.js.
Figure 2.7. Shared app object in a web app
Figure 2.8. An HTML response from a web server that pulls titles from a JSON file and returns results as a web page
Figure 2.9. An echo server repeating the data sent to it
Figure 2.10. Serial execution of asynchronous tasks is similar, conceptually, to synchronous logic: tasks are executed in sequence. Parallel tasks, however, don’t have to execute one after another.
Figure 2.11. How serial flow control works
Figure 2.12. Using parallel flow control to implement a frequency count of word use in numerous files