In the previous two chapters, we built a small and somewhat useful application for storing notes, and then made it work on mobile devices. While our application works reasonably well, it doesn't store these notes anywhere on a long-term basis, meaning the notes are lost when you stop the server, and if you run multiple instances of Notes, each instance has its own set of notes. Our next step is to introduce a database tier to persist the notes to long-term storage.
In this chapter, we will look at database support in Node.js, with the goal being to gain exposure to several kinds of databases. For the Notes application, the user should see the same set of notes for any Notes instance accessed, and the user should be able to reliably access notes at any time.
We'll start with the Notes application code used in the previous chapter. We started...