O'Reilly logo

Getting Started with hapi.js by John Brett

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

Summary

In this chapter, we've introduced and looked in detail at routing in hapi. We looked at ways to add and configure routes in hapi. We've looked more in depth at the request life cycle and hapi's routing algorithm, the trade-offs they provide, how it affects our routing strategies, and where we can take advantage of them to simplify our application logic. We also looked at hapi's request object, and how it is modified throughout the request life cycle. Finally, we looked at the reply interface, how it can be extended, and how to use hapi plugins that extend the reply interface to cater to server static content and templating.

Hopefully, at this stage you have a good understanding of all the routing logic under the hood in hapi, feel comfortable ...

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