Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 369 Bytes

README.md

File metadata and controls

21 lines (14 loc) · 369 Bytes

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