O'Reilly logo

Developing a hapi Edge: A Rich Node.js Framework for Apps and Services by Foreword by Eran Hammer, Lloyd Benson, Daniel Bretoi, Van Nguyen, Wyatt Preul

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

pipe it to /dev/null... is it web scale?

-- Humorous video regarding MongoDB

Models provide the backbone for any useful web application. They are responsible for managing data: connecting to sources of data, reading data, creating data, and so on. Decisions regarding data - including database choices, schema design, and index design - all have a huge impact on how an application performs or even behaves.

Data can come from anywhere: from the web, from a database, from a file, or from a service. For our hapi-plugins application, we will be focusing on getting our data from the web via HTTP and from a database.

Using HTTP

One popular way to obtain data for an application is to use third party web APIs. Your application may ...

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