Pibd-21_Ievlewa_M.D._Intern.../node_modules/server-destroy
2023-12-06 19:36:44 +03:00
..
index.js lab_3 2023-12-06 19:36:44 +03:00
LICENSE lab_3 2023-12-06 19:36:44 +03:00
package.json lab_3 2023-12-06 19:36:44 +03:00
README.md lab_3 2023-12-06 19:36:44 +03:00
test.js lab_3 2023-12-06 19:36:44 +03: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();