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

Function showHelp

scripts/static-server.mjs:183–230  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

181}
182
183function showHelp() {
184 console.log(`
185Combined static file server + reverse proxy.
186
187USAGE:
188 node scripts/static-server.mjs [options]
189
190OPTIONS:
191 -p, --port <port> Port to bind (default: 3001)
192 -H, --host <host> Hostname to bind (default: :: dual-stack)
193 -d, --dir <dir> Directory to serve (default: build)
194 -r, --route <prefix=url> Proxy <prefix> (and subpaths) to <url>;
195 may be repeated. WebSockets supported.
196 --session-api-key <key> Inject session API key into index.html so the
197 pre-built frontend authenticates to agent-server
198 without needing VITE_SESSION_API_KEY baked in.
199 --auth-required Inject authRequired flag into index.html so the
200 pre-built frontend shows the API key entry screen
201 (public mode) without VITE_AUTH_REQUIRED baked in.
202 --runtime-services-info <json>
203 Inject a JSON description of the local runtime
204 services into index.html so the pre-built
205 frontend can populate the agent's
206 <RUNTIME_SERVICES> system-prompt block without
207 VITE_RUNTIME_SERVICES_INFO baked in.
208 --lock-to-cloud <cloud-url> Lock backend setup to a single OpenHands Cloud
209 URL. Hides manual/local backend setup and the
210 custom Cloud URL field in the pre-built frontend.
211 --base-path <path> Mount the SPA under <path> (default: /).
212 For example, --base-path /canvas serves
213 index.html and assets under /canvas.
214 --reject-prefix <prefix> Return 503 for requests matching <prefix>
215 instead of SPA-fallbacking to index.html;
216 may be repeated. Useful in --frontend-only
217 mode to cleanly reject API paths.
218 -h, --help Show this help
219
220ROUTING:
221 • Routes are matched by longest prefix first (most-specific wins).
222 • Reject prefixes are checked before SPA fallback — matching requests
223 get 503 immediately.
224 • Anything that does not match a route or reject prefix is served
225 from --dir.
226 • Unknown paths fall back to index.html (SPA mode), unless they look
227 like an asset request (have a known file extension), in which case
228 a 404 is returned.
229`);
230}
231
232// ─────────────────────────────────────────────────────────────────────────────
233// Runtime config injection

Callers 1

parseArgsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected