List of Figures

 

Chapter 1. Welcome to Node.js

Figure 1.1. An example of non-blocking I/O in the browser

Figure 1.2. WebFaction Apache/NGINX benchmark

Figure 1.3. Browserling: interactive cross-browser testing using Node.js

Figure 1.4. Browserling workflow

Figure 1.5. An example of non-blocking I/O in Node

Chapter 2. Building a multiroom chat application

Figure 2.1. Entering a message into the chat application

Figure 2.2. Changing one’s chat name

Figure 2.3. Changing rooms

Figure 2.4. The results of changing to a new room

Figure 2.5. Handling HTTP and WebSocket within a single application

Figure 2.6. The skeletal project directory for the chat application

Figure 2.7. When npm is used to install dependencies, a node_modules directory is created.

Figure 2.8. In this chat application, there’s both client-side and server-side JavaScript logic.

Figure 2.9. The application in progress

Figure 2.10. A name-change request and response

Figure 2.11. Sending a chat message

Figure 2.12. Changing to a different chat room

Figure 2.13. Escaping untrusted content

Figure 2.14. The completed chat application

Chapter 3. Node programming fundamentals

Figure 3.1. It’s easier to navigate your code if you organize it using directories and separate files rather than keeping your application in one long file.

Figure 3.2. The population of the module.exports property or the exports object allows a module to select what should be shared with the application.