Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jessekrubin/fastify-shitty
Make fastify worse
https://github.com/jessekrubin/fastify-shitty
Last synced: 27 days ago
JSON representation
Make fastify worse
- Host: GitHub
- URL: https://github.com/jessekrubin/fastify-shitty
- Owner: jessekrubin
- License: mit
- Created: 2021-08-20T18:21:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-07T21:02:49.000Z (8 months ago)
- Last Synced: 2024-05-07T22:24:10.107Z (8 months ago)
- Language: TypeScript
- Size: 163 KB
- Stars: 14
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fastify-shitty
Fastify plugin to help solve this issue: [fastify/fastify#2955](https://github.com/fastify/fastify/issues/2955)
Fastify is excellent; to make fastify less excellent, fastify-shitty throws errors randomly and/or delays sending responses.
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
Supports Fastify versions `3.x`
## Install
```
npm i @jsse/fastify-shitty
```## Usage
Require `@jsse/fastify-shitty` and register.
```js
const fastify = require('fastify')()fastify.register(require('@jsse/fastify-shitty'), {
// put your options here
odds: 0.5, // odds of throwing error; default is `0.2`
delay: false // delay responses (t/f); default is `true`
})fastify.listen(3000)
```## Acknowledgements
- fastify, for being excellent
- mom & dad
## License
Licensed under [MIT](./LICENSE).