devserver

command
v0.0.0-...-8c3123b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Command devserver serves the admin dashboard's static assets off disk and reverse-proxies the API to a control plane, so the UI can be iterated on locally without rebuilding/redeploying the control-plane image.

The browser talks to a single origin (this server): static files come from ./static and any /api/, /login, or /health request is proxied to the control plane with the internal-secret header injected server-side. Same-origin → no CORS, and the secret never reaches page JS. The UI uses relative /api/v1 paths, so it runs byte-for-byte the same whether embedded or served here.

peepernetes-style usage: one --context drives everything (secret + port-forward + banner). Run one per environment:

go run ./controlplane/admin/devserver --context mw-prod-us-admin --listen 127.0.0.1:5173
go run ./controlplane/admin/devserver --context mw-dev-admin     --listen 127.0.0.1:5174

The banner is red when the context name contains "prod". Edit controlplane/admin/static/*.html and refresh — no rebuild. Without --context it falls back to an external --target + --secret.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL