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

Function startServerWithRuntimeInfo

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

Source from the content-addressed store, hash-verified

388
389 describe("runtime services info exposure", () => {
390 async function startServerWithRuntimeInfo(
391 dir: string,
392 runtimeServicesInfo: string,
393 ) {
394 const server = await startStaticServer({
395 port: 0,
396 host: "127.0.0.1",
397 dir,
398 routes: {},
399 runtimeServicesInfo,
400 });
401 servers.push(server);
402 const address = server.address();
403 if (!address || typeof address === "string") {
404 throw new Error("Static server did not bind to a TCP port");
405 }
406 return `http://127.0.0.1:${address.port}`;
407 }
408
409 // Legacy compatibility for older Docker / published-binary frontend
410 // bundles, which read runtime services from this injected window global.

Callers 1

Calls 1

startStaticServerFunction · 0.90

Tested by

no test coverage detected