MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / resolvePort

Function resolvePort

apps/vis/server/src/config.ts:14–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12
13/** HTTP port for the vis API server. */
14export function resolvePort(): number {
15 const raw = process.env['PORT'];
16 if (raw !== undefined && raw.length > 0) {
17 const n = Number.parseInt(raw, 10);
18 if (Number.isFinite(n) && n > 0 && n < 65536) {
19 return n;
20 }
21 }
22 return 3001;
23}
24
25/** HTTP host for the vis API server. Defaults to loopback. */
26export function resolveHost(): string {

Callers 1

startVisServerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected