concept configuration in category hapi

This is an excerpt from Manning's book hapi.js in Action.
But why is configuration better than code? To illustrate the difference between a configuration-centric and code-centric API, imagine we’re making a JavaScript library for an automated production line of jellybeans. An example of such a library that is code-centric or rich in methods might look like this code.
In this section we’re going to look at working with client-side caching with hapi. First, I’ll show you how to manually set headers with hapi. Then I’ll show you a convenient feature in hapi that lets you control cache headers by setting policies in configuration. Finally, we’ll take a look at ways of dealing with revalidation and ETags.
Rather than manually adding headers inside of handlers for each route, hapi offers a way to set the client-caching policy in the configuration for the route. Listing 8.2 shows the example from the previous section, but this time using the config.cache property in the route configuration. As mentioned before when talking about the philosophy of hapi, this configuration-over-code approach helps to separate the concerns of your business logic (inside your handlers) from orthogonal concerns like caching.