Skip to content

Paul-Browne/npm-try-ports

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm-try-ports

try port eg. 8888, if in use try port +1, rinse and repeat.

usage

npm i try-ports

or

npm i -D try-ports

const tryPorts = require("try-ports");

tryPorts(8888, port => {
	// callback with port equal to whatever port was free, starting at 8888
	// rest of your code goes here
}

About

try port eg. 8888, if in use try port +1, rinse and repeat.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published