@jsse/fastify-shitty
v1.0.0
Published
Plugin to make fastify shittier
Maintainers
Readme
fastify-shitty
Fastify plugin to help solve this issue: fastify/fastify#2955
Fastify is excellent; to make fastify less excellent, fastify-shitty throws errors randomly and/or delays sending responses.
Supports Fastify versions 3.x
Install
npm i @jsse/fastify-shittyUsage
Require @jsse/fastify-shitty and register.
import process from "node:process";
import Fastify from "fastify";
import FastifyShitty from "./dist/fastify-shitty.js";
const fastify = Fastify({ logger: true });
fastify.register(FastifyShitty, { odds: 0.3, delay: true });
fastify.get("/", {}, (request, reply) => {
reply.send({ hello: "world" });
});
fastify.listen({ port: 3000, host: "0.0.0.0" }).catch((err) => {
fastify.log.error(err);
process.exit(1);
});Acknowledgements
fastify, for being excellent
mom & dad
License
Licensed under MIT.
