Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    server-destroypublic

    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

    186,448

    version

    1.0.1

    license

    ISC

    repository

    githubgithub

    last publish

    collaborators

    • avatar