
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
find-free-port
Advanced tools
Find free tcp port or pors to listen on. The definition of 'free' port is that connecting to this port and host ('localhost' by default) will not succeed, and thus 'free'.
npm install find-free-port --save
Find a free port to listen on that is >= 3000
var fp = require("find-free-port")
fp(3000, function(err, freePort){
});
Find a free port to listen on that is >= 3000 and < 3100
var fp = require("find-free-port")
fp(3000, 3100, function(err, freePort){
});
Find 3 free ports to listen on that is >= 3000 locally
var fp = require("find-free-port")
fp(3000, 3100, '127.0.0.1', 3, function(err, p1, p2, p3){
});
Find a free port that is >= 3000 and at host 192.168.100.1
var fp = require("find-free-port")
fp(3000, "192.168.100.1", function(err, freePort){
});
If the callback is omitted, then the call returns a Promise that resolve to a list of avaiable ports:
var fp = require("find-free-port")
fp(3000).then(([freep]) => {
console.log('found ' + freep);
}).catch((err)=>{
console.error(err);
});
FAQs
find a free tcp port to listen locally
The npm package find-free-port receives a total of 11,718 weekly downloads. As such, find-free-port popularity was classified as popular.
We found that find-free-port demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.