0.1.7 • Published 5 years ago

hapi-public-route v0.1.7

Weekly downloads
20
License
MIT
Repository
github
Last release
5 years ago

hapi-public-route

Hapi plugin for serving up the public route

installation

'npm install hapi-public-route -S'

usage

const Hapi = require('hapi');

const server = hapi.server();
await server.register([{
  plugin: require('hapi-public-route'),
  options: {
    path: '/puplic/{path*}',
    directories: [
      'public',
      'node_modules/xyz-example-module/assets'
    ],
    options: {
      tags: ['my-tag']
    }
  }
}]);

where:

  • path is the path where the static files will be loaded from

    Default: '/public/{path*}'

  • directories is an array of folders where the static files can be found

    Default: 'public'

  • options is an object containing the hapi route options

    Default: {}

0.1.7

5 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago