inert

Static file and directory handlers for hapi.js.

Latest Version: 7.1.0
hapi-family
Installation:

npm: npm install @hapi/inert

yarn: yarn add @hapi/inert

Module Status:
Version License Node Dependencies CI
7.1.0
hapi helmet github logo
BSD 16, 18, 20 Dependency Status Build Status
6.0.5
hapi helmet github logo
BSD 16, 18, 20 Dependency Status Build Status

Usage

After registration, this plugin adds a new method to the toolkit object and exposes the 'file' and 'directory' route handlers.

Note that inert uses the custom 'file' variety to signal that the response is a static file generated by this plugin.