O'Reilly logo

Pro iOS and Android Apps for Business: with jQuery Mobile, node.js, and MongoDB by Frank Zammetti

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

Writing the Server with Node.js and MongoDB, Part II

Building the server in Chapter 7 wasn’t too difficult, I’m sure you’ll agree, but it’s only half of the equation. Responding to requests properly is fine, but it doesn’t help us actually work with data—as you’ll recall, there was no code in the previous chapter that dealt with that.

In this chapter, we’ll look at the code that takes care of working with data and acts as a service that the server code in main.js uses, namely, the code in the DAO.js file. This will be a relatively small chapter because the amount of code to look at is not that great, but that’s a consequence of using Node.js and Mongoose, and, at the end of the day, it is a Very Good Thing.

A Data Access Object ...

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