You can also configure your app differently in different environments.

See the environments guide for more detail.

Individual slices may also be configured. See the for more detail.

See below for a description of all available methods.

Along with inflector, customizes your your app’s string inflection rules. See the inflector guide for more detail.

slices

Sets the root for the app or slice. For the app, defaults to Dir.pwd. For slices, defaults to the slice’s name under the /slices/ directory.

The root is used for locating the code to be loaded by the app. See the autoloading guide and the for more detail.

shared_app_component_keys

Sets the keys for the app components to be automatically imported into each slice. See the for more detail.

Sets an array of paths (relative to the root of the app or any slice) to be excluded from component auto-registration. Defaults to ["entities"]. See the for more detail.

base_url

Sets the base URL for the app’s web server. This is used when building URLs for named routes. Defaults to "http://0.0.0.0:2300". See the routes guide for more detail.

Add a middleware with use:

Use the before: or after: options to insert a middleware at a particular point in the stack:

If you configure actions to use the format, then Hanami::Middleware::BodyParser will be added automatically and configured to parse JSON request bodies.

Sets the configuration to be used by all actions in the app.

See the for more detail.