server-destroy

Enable destroying a server, and all currently open connections.

npm install server-destroy
39 downloads in the last day
331 downloads in the last week
1 030 downloads in the last month

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();
npm loves you