fix(dev): default port :8080 → :8090
Unblock local dev: Keycloak owns :8080, so tenant-registry shifts to :8090. Prod is functionally unchanged. Refs: M5.1
This commit was merged in pull request #5.
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
type Config struct {
|
||||
Env string // dev | stage | prod
|
||||
Addr string // listen address, e.g. ":8080"
|
||||
Addr string // listen address, e.g. ":8090"
|
||||
KeycloakIssuer string // e.g. http://localhost:8080/realms/breakpilot-dev
|
||||
DatabaseURL string // postgres DSN (unused in skeleton; in-memory store)
|
||||
}
|
||||
@@ -18,8 +18,9 @@ func Load() (*Config, error) {
|
||||
return nil, fmt.Errorf("invalid APP_ENV %q", env)
|
||||
}
|
||||
return &Config{
|
||||
Env: env,
|
||||
Addr: getenv("ADDR", ":8080"),
|
||||
Env: env,
|
||||
// :8090 — Keycloak owns :8080 in the dev stack.
|
||||
Addr: getenv("ADDR", ":8090"),
|
||||
KeycloakIssuer: getenv("KEYCLOAK_ISSUER", "http://localhost:8080/realms/breakpilot-dev"),
|
||||
DatabaseURL: os.Getenv("DATABASE_URL"),
|
||||
}, nil
|
||||
|
||||
@@ -17,8 +17,8 @@ func TestLoad_defaults(t *testing.T) {
|
||||
if cfg.Env != "dev" {
|
||||
t.Errorf("Env = %q, want dev", cfg.Env)
|
||||
}
|
||||
if cfg.Addr != ":8080" {
|
||||
t.Errorf("Addr = %q, want :8080", cfg.Addr)
|
||||
if cfg.Addr != ":8090" {
|
||||
t.Errorf("Addr = %q, want :8090", cfg.Addr)
|
||||
}
|
||||
if cfg.KeycloakIssuer == "" {
|
||||
t.Error("KeycloakIssuer is empty; expected a default")
|
||||
|
||||
Reference in New Issue
Block a user