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

Function startIngress

scripts/dev-static.mjs:436–484  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

434}
435
436function startIngress(config) {
437 logService("ingress", `Starting on port ${config.ingressPort}...`, c.yellow);
438
439 const ingressScript = join(projectRoot, "scripts", "ingress.mjs");
440 const runtimeServicesInfo = JSON.stringify(
441 buildAutomationRuntimeServicesInfo({
442 ...config,
443 frontendKind: "static",
444 }),
445 );
446
447 spawnService(
448 "ingress",
449 "node",
450 [
451 ingressScript,
452 "--port",
453 config.ingressPort.toString(),
454 "--runtime-services-info",
455 runtimeServicesInfo,
456 "--route",
457 `/api/automation=http://localhost:${config.autoBackendPort}`,
458 "--route",
459 `/api=http://localhost:${config.agentServerPort}`,
460 "--route",
461 `/sockets=http://localhost:${config.agentServerPort}`,
462 "--route",
463 `/server_info=http://localhost:${config.agentServerPort}`,
464 "--route",
465 `/health=http://localhost:${config.agentServerPort}`,
466 "--route",
467 `/ready=http://localhost:${config.agentServerPort}`,
468 "--route",
469 `/alive=http://localhost:${config.agentServerPort}`,
470 "--route",
471 `/docs=http://localhost:${config.agentServerPort}`,
472 "--route",
473 `/redoc=http://localhost:${config.agentServerPort}`,
474 "--route",
475 `/openapi.json=http://localhost:${config.agentServerPort}`,
476 "--default",
477 `http://localhost:${config.vitePort}`,
478 ],
479 {
480 cwd: projectRoot,
481 color: c.yellow,
482 },
483 );
484}
485
486// ═══════════════════════════════════════════════════════════════════════════
487// Shutdown / Banner

Callers 1

mainFunction · 0.70

Calls 3

logServiceFunction · 0.70
spawnServiceFunction · 0.70

Tested by

no test coverage detected