feat: Add configurable API port via WILD_CENTRAL_PORT env var

Allow overriding the default API port (5055) for development and
testing when the production daemon is already running.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-09 01:11:25 +00:00
parent 3c3d5be1ea
commit 2a09102e23

View File

@@ -146,6 +146,9 @@ func main() {
host := "0.0.0.0"
port := 5055
if v := os.Getenv("WILD_CENTRAL_PORT"); v != "" {
fmt.Sscanf(v, "%d", &port)
}
addr := fmt.Sprintf("%s:%d", host, port)
slog.Info("wild-central started", "addr", addr, "version", Version)