inert

Static file and directory handlers for hapi.js.

Latest Version: 6.0.1
hapi-family
Installation:

npm: npm install @hapi/inert

yarn: yarn add @hapi/inert

Module Status:
Version License Node Dependencies Travis End of Life
6.0.1
hapi helmet github logo
BSD 12 Dependency Status Build Status

Examples

inert enables a number of common use cases for serving static assets.

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.