O'Reilly logo

Single Page Web Applications: JavaScript end-to-end by Michael S. Mikowski and Josh C. Powell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required