O'Reilly logo

hapi.js in Action by Matt Harrison

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 3. Building a website

This chapter covers

  • Serving static content
  • Serving dynamic HTML with views
  • Working with external HTTP APIs from hapi.js
  • Managing user state with sessions

This chapter follows the building of a simple website to show off some of the front-end features in hapi.js. The website we’ll be creating builds on top of the API project from the previous chapter. It will retrieve data from the API and create dynamic web pages using this data.

Don’t worry if you haven’t followed along with the API project in chapter 2. The finished API has been released as an npm package called dindin-api, which we’ll use as a dependency in this chapter.

npm Package

dindin-api (http://npmjs.com/package/dindin-api)

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