nb-random-port
v1.0.0
Published
NodeJs random and detect port
Downloads
1
Readme
nb-random-port
NodeJs random and detect port
Usage
import randomPort from 'nb-random-port'
randomPort({
from: 4000,
to: 5000,
// exclude port, String or Array
exclude: 4001
}).then(port => {
console.log(port)
})
Parameter
from
start port
to
end port
exclude
exclude port
String
exclude one port
{
exclude: 4001
}
Array
exclude some ports
{
exclude: [4001, 4002, 4003]
}