Like the last chapter, all code samples seen here as well as some extra material can be found online in the repository available at https://github.com/joh nbrett/Getting-Started-with-hapi.js. This chapter had more code than the previous chapters, so I encourage you to take a deeper look, run some examples, and try expanding them where possible. If you have any questions about the code samples in trying to understand the code snippets, or have problems running them, feel free to open an issue.
In this chapter, we looked at the different ways we can structure a code base with hapi using some of the tools provided by the hapi ecosystem, such as plugins. We looked in detail at the plugin API, how to write our own plugins, how to integrate third-party plugins, manage dependencies, and facilitate communication between plugins with server.expose()
. We also took a quick look at the some of the plugins in the hapi ecosystem.
Finally, we looked at alternative methods of managing our server,...