Chapter 8. The server database

This chapter covers
  • The role of the database in an SPA
  • Using JavaScript as the database language with MongoDB
  • Understanding the Node.js MongoDB driver
  • Implementing CRUD operations
  • Using JSV for data validation
  • Pushing data changes to the client with Socket.IO

This chapter builds on code we’ve written in chapter 7. We recommend copying the entire directory structure for that chapter into a new “chapter_8” directory and updating the files there.

In this chapter, we add the database to our SPA for persistent data storage. This completes our vision of using JavaScript end-to-end—on the database, the server, and the browser. When we’re finished, we’ll be able to start our Node.js server application ...

Get Single Page Web Applications now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.