portdiscovery

Finds an open port and sends the output to stdout

Usage no npm install needed!

<script type="module">
  import portdiscovery from 'https://cdn.skypack.dev/portdiscovery';
</script>

README

portdiscovery

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

npm install -g portdiscovery

Usage

Simply run portdiscovery.

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

httpPort=$(portdiscovery)
echo $httpPort