Configure the port search scope
masterBy default, portfinder searches from port 8000 up to 65535. You can modify this behavior in two ways:
1. Global Configuration
Set the search boundaries globally for all subsequent calls using setBasePort and setHighestPort.
2. Per-invocation Configuration
Pass an options object directly to getPort to define a specific range for a single request.
Options object keys:
port: The minimum port to start searching from.stopPort: The maximum port to search up to.
// Global configuration
portfinder.setBasePort(3000); // default: 8000
portfinder.setHighestPort(3333); // default: 65535
// Per-invocation configuration
portfinder.getPort({
port: 3000, // minimum port
stopPort: 3333 // maximum port
}, callback);