Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change bit-server port to use the port range of [4000, 4999] #9296

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scopes/harmony/api-server/api-server.main.runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ export class ApiServerMain {
}

async getRandomPort() {
const startingPort = 3593; // some arbitrary number shy away from the standard 3000
// get random number in the range of [startingPort, 55500].
const randomNumber = Math.floor(Math.random() * (55500 - startingPort + 1) + startingPort);
const startingPort = 4000; // we prefer to have the ports between 4000 and 4999.
// get random number in the range of [startingPort, 4999].
const randomNumber = Math.floor(Math.random() * (4999 - startingPort + 1) + startingPort);
const port = await Port.getPort(randomNumber, 65500);
return port;
}
Expand Down