2.0.0 • Published 6 years ago

hapi-static-files v2.0.0

Weekly downloads
7
License
Apache-2.0
Repository
github
Last release
6 years ago

hapi-static-files

Hapi plugin to serve static files with CORS enabled and maximum cache time.

Installation

npm install hapi-static-files

Usage

// CommonJS
// const HapiStaticFiles = require('hapi-static-files');

// ES6
import HapiStaticFiles from 'hapi-static-files';

// Registration
await server.register({
  plugin: HapiStaticFiles,
  options: {
    path: 'public' // Absolute path or relative to the root folder of the project.
  }
});

Testing

Clone the repository and execute:

npm test

Contribute

  1. Fork it: git clone https://github.com/softonic/hapi-static-files.git
  2. Create your feature branch: git checkout -b feature/my-new-feature
  3. Commit your changes: git commit -am 'Added some feature'
  4. Check the build: npm run build
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request :D
2.0.0

6 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago