package
Enable destroying a server, and all currently open connections.
npm install server-destroyGitHub-flavored package documentation.
Across all versions, last 30 days.
13,829,144 in 30 days
Runtime metadata.
Enable destroying a server, and all currently open connections.
var enableDestroy = require('server-destroy');
var server = http.createServer(function(req, res) {
// do stuff, blah blah blah
});
server.listen(PORT);
// enhance with a 'destroy' function
enableDestroy(server);
// some time later...
server.destroy();