stubborn-server-hash-loader
v1.0.1
Published
Loader plugin for stubborn-server
Downloads
29
Maintainers
Readme
stubborn-server-hash-loader
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