| .. | |||
| LICENSE | 4 months ago | ||
| README.md | 4 months ago | ||
| index.js | 4 months ago | ||
| package.json | 4 months ago | ||
| test.js | 4 months ago | ||
Enable destroying a server, and all currently open connections.
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();