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

Function buildMarsWebEnv

scripts/dev-static.mjs:441–450  ·  view source on GitHub ↗
(role, config)

Source from the content-addressed store, hash-verified

439 * included, so a stack with no session key mounts nothing.
440 */
441export function buildMarsWebEnv(role, config) {
442 if (role === "static") return { MARS_WEB: "0" };
443 return config.sessionApiKey
444 ? {
445 MARS_WEB_KEY: config.sessionApiKey,
446 ...(config.stateDir ? { MARS_STATE_DIR: config.stateDir } : {}),
447 ...(config.secretKey ? { OH_SECRET_KEY: config.secretKey } : {}),
448 }
449 : { MARS_WEB: "0" };
450}
451
452function startStaticServer(config) {
453 // Reuse `vitePort` as the upstream port name so the ingress route table

Callers 4

dev-static.test.tsFile · 0.90
startStaticServerFunction · 0.70
startIngressFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected