MCPcopy Create free account
hub / github.com/cloudflare/computer / toHttpUrl

Function toHttpUrl

packages/computerd/src/cli/computerd.ts:442–446  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

440}
441
442function toHttpUrl(input: string): string {
443 if (input.startsWith("ws://")) return `http://${input.slice("ws://".length)}`;
444 if (input.startsWith("wss://")) return `https://${input.slice("wss://".length)}`;
445 return input;
446}
447
448async function main(): Promise<void> {
449 // Install logging + crash handlers first thing so any early throws

Callers 1

waitForHealthFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected