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

Function startIngress

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

Source from the content-addressed store, hash-verified

510}
511
512function startIngress(config) {
513 logService("ingress", `Starting on port ${config.ingressPort}...`, c.yellow);
514
515 const ingressScript = join(projectRoot, "scripts", "ingress.mjs");
516 const runtimeServicesInfo = JSON.stringify(
517 buildAutomationRuntimeServicesInfo({
518 ...config,
519 frontendKind: "static",
520 }),
521 );
522
523 spawnService(
524 "ingress",
525 "node",
526 [
527 ingressScript,
528 "--port",
529 config.ingressPort.toString(),
530 ...bindHostArgs(config.bindHost),
531 "--runtime-services-info",
532 runtimeServicesInfo,
533 ...buildLocalServiceRouteArgs(config),
534 ...getNoReferrerPrefixArgs(config),
535 "--default",
536 `http://localhost:${config.vitePort}`,
537 ],
538 {
539 cwd: projectRoot,
540 color: c.yellow,
541 env: buildMarsWebEnv("ingress", config),
542 },
543 );
544}
545
546// ═══════════════════════════════════════════════════════════════════════════
547// Shutdown / Banner

Callers 1

mainFunction · 0.70

Calls 7

bindHostArgsFunction · 0.90
getNoReferrerPrefixArgsFunction · 0.90
logServiceFunction · 0.70
spawnServiceFunction · 0.70
buildMarsWebEnvFunction · 0.70

Tested by

no test coverage detected