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

Function buildConfig

scripts/ingress.mjs:111–129  ·  view source on GitHub ↗
(args, env = process.env)

Source from the content-addressed store, hash-verified

109}
110
111function buildConfig(args, env = process.env) {
112 let routes = { ...args.routes };
113
114 // Merge env routes
115 if (env.INGRESS_ROUTES) {
116 try {
117 const envRoutes = JSON.parse(env.INGRESS_ROUTES);
118 routes = { ...routes, ...envRoutes };
119 } catch (e) {
120 console.error("Failed to parse INGRESS_ROUTES:", e.message);
121 }
122 }
123
124 return {
125 port: args.port || parseInt(env.INGRESS_PORT, 10) || 8000,
126 routes,
127 defaultBackend: args.defaultBackend || env.INGRESS_DEFAULT || null,
128 };
129}
130
131// ═══════════════════════════════════════════════════════════════════════════
132// Server

Callers 3

mainFunction · 0.90
ingress.mjsFile · 0.70

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected