diff --git a/README.md b/README.md index 8f99820..b2e72f4 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,47 @@ -# FastifyGracefulExit - -[![npm version](https://img.shields.io/npm/v/@mgcrea/fastify-graceful-exit.svg)](https://github.com/mgcrea/fastify-graceful-exit/releases) -[![license](https://img.shields.io/npm/l/@mgcrea/fastify-graceful-exit)](https://tldrlegal.com/license/mit-license) -[![build status](https://img.shields.io/github/workflow/status/mgcrea/fastify-graceful-exit/ci)](https://github.com/mgcrea/fastify-graceful-exit/actions) -[![dependencies status](https://img.shields.io/david/mgcrea/fastify-graceful-exit)](https://david-dm.org/mgcrea/fastify-graceful-exit) -[![devDependencies status](https://img.shields.io/david/dev/mgcrea/fastify-graceful-exit)](https://david-dm.org/mgcrea/fastify-graceful-exit?type=dev) - -Graceful exit for [fastify](https://github.com/fastify/fastify). - -- Built with [TypeScript](https://www.typescriptlang.org/) for static type checking with exported types along the - library. +# Fastify GracefulExit Plugin + + +

+ + npm version + + + npm total downloads + + + npm monthly downloads + + + npm license + +
+ + build status + + + dependencies status + +

+ + +Graceful exit plugin for [fastify](https://github.com/fastify/fastify). + +- Written in [TypeScript](https://www.typescriptlang.org/) for static type checking with exported types along the library. +- Built by [tsup](https://tsup.egoist.dev) to provide both CommonJS and ESM packages. ## Usage ```bash npm install fastify-cookie @mgcrea/fastify-graceful-exit --save # or -yarn add fastify-cookie @mgcrea/fastify-graceful-exit +pnpm add fastify-cookie @mgcrea/fastify-graceful-exit ``` You probably want to disable fastify own request logging using the `disableRequestLogging` option. ```ts -import createFastify, { FastifyInstance, FastifyServerOptions } from 'fastify'; -import fastifyGracefulExit from '@mgcrea/fastify-graceful-exit'; +import createFastify, { FastifyInstance, FastifyServerOptions } from "fastify"; +import fastifyGracefulExit from "@mgcrea/fastify-graceful-exit"; export const buildFastify = (options: FastifyServerOptions = {}): FastifyInstance => { const fastify = createFastify({ disableRequestLogging: true, ...options });