Nascent Political Miscreant

    server-destroy
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/server-destroy package

    1.0.1 • Public • Published

    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();

    Keywords

    none

    Install

    npm i server-destroy

    DownloadsWeekly Downloads

    1,294,947

    Version

    1.0.1

    License

    ISC

    Last publish

    Collaborators

    • isaacs