lix-website/themes/lix/assets/bootstrap/node_modules/server-destroy/README.md

22 lines
369 B
Markdown
Raw Normal View History

2024-04-27 03:39:10 +00:00
# server-destroy
Enable destroying a server, and all currently open connections.
## Usage
```javascript
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();
```