Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (15 sloc) 0.509 kb

portdiscovery

Finds an open port (using portfinder) and sends output to stdout

npm install -g portdiscovery

Usage

Simply run portdiscovery and it will look for open ports starting in 8000.

You can specify a base port if 8000 doesn't fit your needs: portdiscovery 8010

Cool tip

You can assign to a bash variable then use it to deploy your apps, for example:

httpPort=$(portdiscovery)
echo $httpPort
Jump to Line
Something went wrong with that request. Please try again.