dictatorship

0.1.1 • Public • Published

dictatorship

Your EADDRINUSE nightmares can come to an end.

overthrow(port, fn)

Look for processes currently listening in the provided port, process.kill all of them, and then invoke the callback function, which will be safely able to listen on that port.

Installation

npm install dictatorship --save

Usage

    var dictatorship = require('dictatorship');
 
    dictatorship.overthrow(port, function(){
        app.listen(port); // no EADDRINUSE non-sense
    });

Not recommended for production environments. The purpose of this module is to overthrow renegade node processes spawned by grunt-contrib-watch and their ilk.

Dependents (0)

Package Sidebar

Install

npm i dictatorship

Weekly Downloads

1

Version

0.1.1

License

none

Last publish

Collaborators

  • bevacqua