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

Function showHelp

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

Source from the content-addressed store, hash-verified

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

Callers 1

parseArgsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected