grop

Get a random open port on the host machine

Usage no npm install needed!

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

README

GROP — Get Random Open Port

Returns a random open port on the host machine

Usage

var grop = require('grop')

grop(function (port) {
  console.log('Available port: %d', port)
})