HckApm/node_modules/server-destroy
minicx 99e5f883a3 second commit 2023-12-23 14:56:27 +03:00
..
LICENSE second commit 2023-12-23 14:56:27 +03:00
README.md second commit 2023-12-23 14:56:27 +03:00
index.js second commit 2023-12-23 14:56:27 +03:00
package.json second commit 2023-12-23 14:56:27 +03:00
test.js second commit 2023-12-23 14:56:27 +03:00

README.md

server-destroy

Enable destroying a server, and all currently open connections.

Usage

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();