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

Function previewPort

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

Source from the content-addressed store, hash-verified

208
209/** Derive a deterministic-ish port in the 4500–4999 range from the artifact id. */
210export function previewPort(id: string): number {
211 let h = 0;
212 for (let i = 0; i < id.length; i++) h = (h * 31 + id.charCodeAt(i)) >>> 0;
213 return 4500 + (h % 500);
214}
215
216/** A stable process/registry name for an artifact's LIVE server. */
217export function liveServerName(id: string): string {

Callers 2

executeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected