You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 369 B

3 years ago
123456789101112131415161718192021
  1. # server-destroy
  2. Enable destroying a server, and all currently open connections.
  3. ## Usage
  4. ```javascript
  5. var enableDestroy = require('server-destroy');
  6. var server = http.createServer(function(req, res) {
  7. // do stuff, blah blah blah
  8. });
  9. server.listen(PORT);
  10. // enhance with a 'destroy' function
  11. enableDestroy(server);
  12. // some time later...
  13. server.destroy();
  14. ```