Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

errorh

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

errorh

Custom error pages for Hapi

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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.

npm version Dependency Status Build Status Coverage Status Code Climate

Usage

server.register({
    register: require('errorh'),
    options: {
        errorFiles: {
            404: '404.html',
            default: 'error.html'
        },
        staticRoute: {
             path: '/{path*}',
             method: '*',
             handler: {
                 directory: {
                     path: './',
                     index: true,
                     redirectToSlash: true
                 }
             }
        }
    }
}, (err) => {
    ...
});

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 file route.

Contributing

Keywords

FAQs

Package last updated on 07 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc