Chapter 1. Welcome to Node.js
Figure 1.1. Asynchronous and nonblocking components in a Node application
Chapter 2. Node programming fundamentals
Figure 2.5. Steps to finding a module
Figure 2.7. Shared app object in a web app
Figure 2.9. An echo server repeating the data sent to it
Chapter 3. What is a Node web application?
Chapter 4. Front-end build systems
Chapter 5. Server-side frameworks
Figure 5.1. Koa middleware execution order
Figure 5.2. LoopBack’s project generator
Chapter 6. Connect and Express in depth
Figure 6.1. The life cycle of two HTTP requests making their way through a Connect server
Figure 6.2. Middleware ordering is important.
Figure 6.3. The life cycle of an HTTP request causing an error in a Connect server
Figure 6.4. Default application skeleton structure using EJS templates
Figure 6.6. Generated package.json contents
Figure 6.7. Default Express application
Figure 6.8. HTML template plus data = HTML view of data
Figure 6.9. The view cache setting
Figure 6.10. Express view lookup process
Figure 6.12. User registration form
Figure 6.13. Registration form error reporting
Figure 6.15. User login and registration menu used to access the forms you created
Chapter 7. Web application templating
Figure 7.1. The flow of an MVC application and its interaction with the template layer
Chapter 8. Storing application data
Figure 8.1. Knex’s usage statistics
Figure 8.2. MongoDB’s usage statistics
Figure 8.3. The redis package’s statistics on npm
Figure 8.4. Redis channels provide an easy solution to a common data-delivery scenario.
Chapter 9. Testing Node applications
Figure 9.1. Test framework overview
Figure 9.2. Failing test in Mocha
Figure 9.3. Successful test in Mocha
Figure 9.4. Vows can structure tests in a suite using batches, contexts, topics, and vows.
Figure 9.5. Vows combines full-featured BDD testing with macros and flow control.
Figure 9.6. Testing with browser automation
Chapter 10. Deploying Node applications and maintaining uptime
Figure 10.1. The Forever tool helps you keep your application running, even if it crashes.
Figure 10.2. A master spawning three workers on a four-core processor
Figure 10.3. You can use Nginx as a proxy to relay static assets quickly back to web clients.
Chapter 11. Writing command-line applications
Chapter 12. Conquering the desktop with Electron
Figure 12.1. Visual Studio Code’s application window and a native context menu
Figure 12.2. The main parts of a typical Electron application
Figure 12.3. The electron-quick-start project running in macOS
Figure 12.4. The HTTP Master Electron application
Figure 12.5. A desktop notification
Figure 12.6. A typical Electron application bundle’s contents
Appendix A. Installing Node
Figure A.1. The installer .pkg file
Figure A.2. The installation wizard
Appendix B. Automating the web with scraping
Figure B.1. Steps for scraping and storing content
Figure B.2. Octopart allows users to search for electronic parts.
Figure B.3. Scraping with cheerio
Appendix C. Connect’s officially supported middleware
Figure C.1. How a form is processed by body-parser
Figure C.3. Using methodoverride to simulate a PUT request to update a form in the browser
Figure C.4. Basic authentication prompt
Figure C.5. The default errorhandler HTML as displayed in a web browser
Figure C.6. Serving directory listings with Connect’s directory() middleware component