concept Lout in category hapi

appears as: Lout
hapi.js in Action

This is an excerpt from Manning's book hapi.js in Action.

11.2.2. Autogenerated documentation with Lout

Lout is a plugin that adds an extra route to your application (by default this is found at /docs). Lout crawls all the routes on your server, inspecting each of them, and then produces browsable, detailed HTML documentation, all automatically.

Let’s try Lout (npm install --save lout@9) now (see the following listing). It depends on both Vision v4 and Inert v3 plugins, so we must register those along with Lout before starting our application.

Listing 11.7. Register all necessary plugins for Lout to work

Lout doesn’t require any explicit configuration up front because it comes with a set of sensible defaults to ensure that it works out of the box. When your application starts up, you can browse to /docs to view the generated documentation, shown in figure 11.3.

Figure 11.3. Automatic documentation with Lout