MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / livePort

Function livePort

src/artifacts/preview.ts:223–227  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

221/** Deterministic-ish port in the 5000–5499 range — DISJOINT from previewPort's 4500–4999
222 * so a live server and a static preview for the same id don't collide. */
223export function livePort(id: string): number {
224 let h = 0;
225 for (let i = 0; i < id.length; i++) h = (h * 31 + id.charCodeAt(i)) >>> 0;
226 return 5000 + (h % 500);
227}

Callers 1

executeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected