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:
3
main.go
3
main.go
@@ -146,6 +146,9 @@ func main() {
|
|||||||
|
|
||||||
host := "0.0.0.0"
|
host := "0.0.0.0"
|
||||||
port := 5055
|
port := 5055
|
||||||
|
if v := os.Getenv("WILD_CENTRAL_PORT"); v != "" {
|
||||||
|
fmt.Sscanf(v, "%d", &port)
|
||||||
|
}
|
||||||
|
|
||||||
addr := fmt.Sprintf("%s:%d", host, port)
|
addr := fmt.Sprintf("%s:%d", host, port)
|
||||||
slog.Info("wild-central started", "addr", addr, "version", Version)
|
slog.Info("wild-central started", "addr", addr, "version", Version)
|
||||||
|
|||||||
Reference in New Issue
Block a user