Kevin 29b9a0c50c clean && clean html base | 4 éve | |
---|---|---|
.. | ||
LICENSE | 4 éve | |
README.md | 4 éve | |
index.js | 4 éve | |
package.json | 4 éve | |
test.js | 4 éve |
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();