Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

stubborn-server-hash-loader

ruyadorno28MIT1.0.1

Loader plugin for stubborn-server

stubborn-server, serve, plugin, stub, hash, loader

readme

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