MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / startServerWithRuntimeInfo

Function startServerWithRuntimeInfo

__tests__/scripts/static-server.test.ts:116–133  ·  view source on GitHub ↗
(
      dir: string,
      runtimeServicesInfo: string,
    )

Source from the content-addressed store, hash-verified

114
115 describe("runtime services info injection", () => {
116 async function startServerWithRuntimeInfo(
117 dir: string,
118 runtimeServicesInfo: string,
119 ) {
120 const server = await startStaticServer({
121 port: 0,
122 host: "127.0.0.1",
123 dir,
124 routes: {},
125 runtimeServicesInfo,
126 });
127 servers.push(server);
128 const address = server.address();
129 if (!address || typeof address === "string") {
130 throw new Error("Static server did not bind to a TCP port");
131 }
132 return `http://127.0.0.1:${address.port}`;
133 }
134
135 // Regression test for the Docker / published-binary path: static builds
136 // have no VITE_RUNTIME_SERVICES_INFO baked in, so the agent's

Callers 1

Calls 1

startStaticServerFunction · 0.90

Tested by

no test coverage detected