biobulkbende.org/node_modules/server-destroy
Tancre 0efda7fffe structure, layout and automation 2020-09-16 14:23:28 +02:00
..
LICENSE structure, layout and automation 2020-09-16 14:23:28 +02:00
README.md structure, layout and automation 2020-09-16 14:23:28 +02:00
index.js structure, layout and automation 2020-09-16 14:23:28 +02:00
package.json structure, layout and automation 2020-09-16 14:23:28 +02:00
test.js structure, layout and automation 2020-09-16 14:23:28 +02: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();