errorh
Custom static error pages for Hapi. This plugin depends on inert to function.
Similarly, please ensure that the route files are configured. A static file route must already be in place.
If not, you may use the staticRoute
option to specify one.
Usage
// configuring route filesconst server = connections: routes: files: relativeTo: '/path/to/files' ; // registering the pluginserver;
Glue manifest
registrations: plugin: register: 'errorh' options: ...
Options
- errorFiles -
object
containing the status code to file config. - staticRoute -
route object
for setting up the inert static directory handler.
You can disable the plugin on a specific routes through config: { plugins: { errorh: false } }
.
Contributing
- Include 100% test coverage.
- Follow the Hapi coding conventions
- Submit an issue first for significant changes.