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

Function showHelp

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

Source from the content-addressed store, hash-verified

246}
247
248function showHelp() {
249 console.log(`
250Combined static file server + reverse proxy.
251
252USAGE:
253 node scripts/static-server.mjs [options]
254
255OPTIONS:
256 -p, --port <port> Port to bind (default: 3001)
257 -H, --host <host> Hostname to bind (default: 127.0.0.1 loopback).
258 Use 0.0.0.0 or :: to expose on the LAN; the
259 session key is then not injected unless you also
260 pass --allow-lan-session-key.
261 -d, --dir <dir> Directory to serve (default: build)
262 -r, --route <prefix=url> Proxy <prefix> (and subpaths) to <url>;
263 may be repeated. WebSockets supported.
264 --session-api-key <key> Inject session API key into index.html so the
265 pre-built frontend authenticates to agent-server
266 without needing VITE_SESSION_API_KEY baked in.
267 Alternatively set SESSION_API_KEY env var (not
268 shown in process listings), which is preferred on
269 shared hosts.
270 --auth-required Inject authRequired flag into index.html so the
271 pre-built frontend shows the API key entry screen
272 (public mode) without VITE_AUTH_REQUIRED baked in.
273 --allow-lan-session-key Permit --session-api-key when --host is not
274 loopback (Docker/container entrypoints only).
275 --runtime-services-info <json>
276 Inject a JSON description of the local runtime
277 services into index.html so the pre-built
278 frontend can populate the agent's
279 <RUNTIME_SERVICES> system-prompt block without
280 VITE_RUNTIME_SERVICES_INFO baked in.
281 --lock-to-cloud <cloud-url> Lock backend setup to a single OpenHands Cloud
282 URL. Hides manual/local backend setup and the
283 custom Cloud URL field in the pre-built frontend.
284 --disable-telemetry Disable all product telemetry (including the
285 anonymous install event) in the pre-built
286 frontend at runtime, without VITE_DO_NOT_TRACK
287 baked in. Injects
288 window.__AGENT_CANVAS_DO_NOT_TRACK__ = true.
289 Equivalent to AGENT_CANVAS_DISABLE_TELEMETRY=1.
290 --base-path <path> Mount the SPA under <path> (default: /).
291 For example, --base-path /canvas serves
292 index.html and assets under /canvas.
293 --vscode-base-path <path> Advertise to the frontend that this origin
294 serves the editor under <path>, so the editor
295 control renders here. Requires a matching
296 --route; the server refuses to start otherwise,
297 since advertising a prefix it does not route
298 produces a control that opens the SPA. Omit on
299 any origin without the editor route.
300 --reject-prefix <prefix> Return 503 for requests matching <prefix>
301 --no-referrer-prefix <p> Send "Referrer-Policy: no-referrer" on proxied
302 responses under <p>. For upstreams whose URL
303 carries a credential in the query string.
304 instead of SPA-fallbacking to index.html;
305 may be repeated. Useful in --frontend-only

Callers 1

parseArgsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected