Skip to content

bevacqua/dictatorship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Prevents EADDRINUSE by killing processes listening on your favorite port

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages