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

Function deriveHttpPort

packages/server/test/helpers/serverHarness.ts:121–127  ·  view source on GitHub ↗
(address: string)

Source from the content-addressed store, hash-verified

119const opened = new Set<ServerHarness>();
120
121function deriveHttpPort(address: string): string {
122 const port = new URL(address).port;
123 if (port === '') {
124 throw new Error(`cannot derive port from server address: ${address}`);
125 }
126 return port;
127}
128
129/**
130 * Boot an isolated `startServer` for e2e use.

Callers 1

bootFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected