https://github.com/ruyadorno/stubborn-server-hash-loader
Loader plugin for stubborn-server
https://github.com/ruyadorno/stubborn-server-hash-loader
Last synced: 16 days ago
JSON representation
Loader plugin for stubborn-server
- Host: GitHub
- URL: https://github.com/ruyadorno/stubborn-server-hash-loader
- Owner: ruyadorno
- License: mit
- Created: 2018-09-27T03:43:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T09:11:49.000Z (over 2 years ago)
- Last Synced: 2025-03-15T21:40:33.307Z (about 1 month ago)
- Language: JavaScript
- Size: 794 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stubborn-server-hash-loader
[![NPM version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Coverage percentage][coveralls-image]][coveralls-url]
[![License MIT][license-image]][license-url]> Loader plugin for stubborn-server
## About
[stubborn-server](https://github.com/zeachco/stubborn-server) is a lightweight mock/stubbing server based upon [express](http://expressjs.com/).
**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](https://github.com/ruyadorno/request-hash).
## Installation
```sh
$ npm install --save stubborn-server-hash-loader
```## Usage
```js
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](http://ruyadorno.com)
[npm-image]: https://badge.fury.io/js/stubborn-server-hash-loader.svg
[npm-url]: https://npmjs.org/package/stubborn-server-hash-loader
[travis-image]: https://travis-ci.org/ruyadorno/stubborn-server-hash-loader.svg?branch=master
[travis-url]: https://travis-ci.org/ruyadorno/stubborn-server-hash-loader
[coveralls-image]: https://coveralls.io/repos/ruyadorno/stubborn-server-hash-loader/badge.svg
[coveralls-url]: https://coveralls.io/r/ruyadorno/stubborn-server-hash-loader
[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: https://raw.githubusercontent.com/ruyadorno/request-hash/master/LICENSE