Lobashov_Ivan_PIBD-21_IP/Lab3/node_modules/server-destroy
2024-01-10 22:39:31 +04:00
..
index.js lab 2-5 2024-01-10 22:39:31 +04:00
LICENSE lab 2-5 2024-01-10 22:39:31 +04:00
package.json lab 2-5 2024-01-10 22:39:31 +04:00
README.md lab 2-5 2024-01-10 22:39:31 +04:00
test.js lab 2-5 2024-01-10 22:39:31 +04:00

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