{"library":"http-shutdown","type":"library","category":null,"description":"http-shutdown is a Node.js library designed for gracefully shutting down HTTP servers, addressing shortcomings of the native `server.close()` method. Unlike `server.close()` which only terminates the listening socket and waits for existing connections, `http-shutdown` actively closes idle keep-alive sockets and waits for all in-flight requests to complete before closing their associated sockets. This ensures no new requests are accepted and all current requests finish cleanly. The library, currently at version 1.2.2, appears to be in a maintenance phase with infrequent but stable releases. It offers two primary integration methods: explicitly wrapping an `http.Server` instance or extending the `http.Server` prototype with a `withShutdown()` method. It ships with TypeScript types, facilitating its use in modern TypeScript projects.","language":"javascript","status":"maintenance","version":"1.2.2","tags":["javascript","http","https","graceful","force","shutdown","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install http-shutdown","imports":["import httpShutdown from 'http-shutdown';","import httpShutdown from 'http-shutdown'; httpShutdown.extend();","import type { WithShutdownServer } from 'http-shutdown';"]},{"cmd":"yarn add http-shutdown","imports":[]},{"cmd":"pnpm add http-shutdown","imports":[]}],"homepage":null,"github":"https://github.com/thedillonb/http-shutdown","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/http-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-shutdown/compatibility"}}