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

Function startServerWithRuntimeInfo

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

Source from the content-addressed store, hash-verified

330
331 describe("runtime services info exposure", () => {
332 async function startServerWithRuntimeInfo(
333 dir: string,
334 runtimeServicesInfo: string,
335 ) {
336 const server = await startStaticServer({
337 port: 0,
338 host: "127.0.0.1",
339 dir,
340 routes: {},
341 runtimeServicesInfo,
342 });
343 servers.push(server);
344 const address = server.address();
345 if (!address || typeof address === "string") {
346 throw new Error("Static server did not bind to a TCP port");
347 }
348 return `http://127.0.0.1:${address.port}`;
349 }
350
351 // Legacy compatibility for older Docker / published-binary frontend
352 // bundles, which read runtime services from this injected window global.

Callers 1

Calls 1

startStaticServerFunction · 0.90

Tested by

no test coverage detected