{"library":"http-graceful-shutdown","type":"library","category":null,"description":"http-graceful-shutdown is a Node.js utility library designed to ensure HTTP and HTTPS servers (including those built with frameworks like Express, Koa, and Fastify, or native Node.js http/http2) shut down cleanly and without disrupting active client connections. It manages open sockets, stops accepting new connections, and allows for the registration of custom cleanup functions (e.g., closing database connections) to execute before the server fully terminates. The library tracks all connections, gracefully communicates shutdown intent to clients, and can optionally destroy remaining sockets forcefully after a timeout. Version 3.1.16 is the current stable release, with version 3.0 being a significant update that improved internal handling while maintaining backward compatibility with 2.x. It has seen over 35 million downloads, indicating its widespread adoption for robust application termination. The release cadence appears stable, with major versions being well-tested.","language":"javascript","status":"active","version":"3.1.16","tags":["javascript","http","https","koa","express","fastify","shutdown","graceful","force","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install http-graceful-shutdown","imports":["const gracefulShutdown = require('http-graceful-shutdown');","import gracefulShutdown from 'http-graceful-shutdown';","import type { Options } from 'http-graceful-shutdown';"]},{"cmd":"yarn add http-graceful-shutdown","imports":[]},{"cmd":"pnpm add http-graceful-shutdown","imports":[]}],"homepage":null,"github":"https://github.com/sebhildebrandt/http-graceful-shutdown","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/http-graceful-shutdown","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/http-graceful-shutdown/compatibility"}}