Building web applications with Hapi
Hapi is another framework for web applications. The original version of Hapi was created based on Express to handle Walmart's Black Friday Sale scaling requirements. Hapi has a contrasting philosophy compared to the other web frameworks we've covered in this chapter.
In this recipe, we will be using the latest version of Hapi, v19, to create a web server. In the There's more section, we will discover how to use some of the Hapi plugins.
Important Note
Hapi follows a detailed long-term support policy, where specific versions of the framework are maintained for specific Node.js versions. Hapi's v19 is the latest release and the first release to support Node.js 14. Hapi lists its support information at https://hapi.dev/resources/status/#hapi.
Getting ready
First, let's create a directory named hapi-app
to hold our project. As we'll be using modules from npm, we'll also need to initialize a new project...