1.0.1 • Published 4 years ago

stubborn-server-hash-loader v1.0.1

Weekly downloads
10
License
MIT
Repository
github
Last release
4 years ago

stubborn-server-hash-loader

NPM version Build Status Coverage percentage License MIT

Loader plugin for stubborn-server

About

stubborn-server is a lightweight mock/stubbing server based upon express.

stubborn-server-hash-loader is a plugin that provides a custom loader that tries to load files using a hash value which is generated by hashing the original request using request-hash.

Installation

$ npm install --save stubborn-server-hash-loader

Usage

const stubbornServer = require('stubborn-server');
const stub = stubbornServer();
const hashLoader = require('stubborn-server-hash-loader');

stub.start({
  plugins: [
    {
      loader: hashLoader({
        // config options, accepts all options from request-hash
        // see: https://github.com/ruyadorno/request-hash
      })
    }
  ]
});

License

MIT © Ruy Adorno