{"library":"destroyable-server","type":"library","category":null,"description":"Destroyable-Server, currently at version 1.1.1, is a compact Node.js module designed to enhance the `net.Server` API by providing a reliable and immediate mechanism to terminate all active client connections. When `server.close()` is invoked, it merely ceases to accept new connections, often leaving existing ones open and preventing the Node.js process from exiting cleanly. This library introduces a `destroy()` method to server instances via its `makeDestroyable` utility, which not only stops listening but also forcibly closes every tracked socket. This capability is critical for scenarios requiring rapid server restarts, robust test suite teardowns, or graceful application shutdowns. It works across various `net.Server` subclasses, including HTTP and TLS, and uniquely offers a promise-based interface for awaiting complete connection termination, differentiating it from `server.closeIdleConnections()` which might miss active connections or not be universally available. The project maintains a stable, low-cadence release cycle, reflecting its focused utility and role as part of HTTP Toolkit.","language":"javascript","status":"active","version":"1.1.1","tags":["javascript","server","close","destroy","shutdown","net","tls","http","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install destroyable-server","imports":["import { makeDestroyable } from 'destroyable-server';","const { makeDestroyable } = require('destroyable-server');","import type { MakeDestroyable } from 'destroyable-server';"]},{"cmd":"yarn add destroyable-server","imports":[]},{"cmd":"pnpm add destroyable-server","imports":[]}],"homepage":"https://httptoolkit.com","github":"https://github.com/httptoolkit/destroyable-server","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/destroyable-server","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/destroyable-server/compatibility"}}