xtablo-source/backend
Arthur Belleville 08a2c3cd96
feat(01-03): cmd/web entrypoint with graceful shutdown
- Reads DATABASE_URL (required), PORT (default 8080), ENV (default
  development) from os.Getenv only — no third-party env loader (D-15:
  .env exported by just dev, prod injects real env)
- slog.SetDefault wired before fatal-on-missing-DSN so even startup errors
  emit structured output; sanitization per T-01-12 (never log DSN)
- pgxpool opened via db.NewPool; chi router mounted with ./static as the
  asset root
- http.Server: ReadTimeout=15s, WriteTimeout=15s, IdleTimeout=60s
  (T-01-10 slow-client mitigation)
- signal.NotifyContext (Go 1.21+) traps SIGINT/SIGTERM, propagates through
  ctx; on signal: srv.Shutdown with 10s timeout, then explicit pool.Close
  (Pitfall 4 — never via defer)
- No /readyz route (Phase 7 scope)
2026-05-14 19:26:22 +02:00
..
bin feat(01-01): create directory skeleton and per-package doc.go placeholders 2026-05-14 17:53:55 +02:00
cmd/web feat(01-03): cmd/web entrypoint with graceful shutdown 2026-05-14 19:26:22 +02:00
internal feat(01-03): templ layout/index/fragments + handlers + chi router 2026-05-14 19:25:43 +02:00
migrations feat(01-01): compose file, env example, gitignore, bootstrap migration 2026-05-14 17:54:18 +02:00
static feat(01-01): create directory skeleton and per-package doc.go placeholders 2026-05-14 17:53:55 +02:00
templates feat(01-03): templ layout/index/fragments + handlers + chi router 2026-05-14 19:25:43 +02:00
.air.toml feat(01-01): sqlc config, tailwind input CSS, air live-reload config 2026-05-14 17:54:35 +02:00
.env.example feat(01-01): compose file, env example, gitignore, bootstrap migration 2026-05-14 17:54:18 +02:00
.gitignore feat(01-01): compose file, env example, gitignore, bootstrap migration 2026-05-14 17:54:18 +02:00
compose.yaml feat(01-01): compose file, env example, gitignore, bootstrap migration 2026-05-14 17:54:18 +02:00
go.mod feat(01-03): pgxpool wrapper, RequestID/slog middleware, slog handler switch 2026-05-14 19:24:16 +02:00
go.sum feat(01-03): pgxpool wrapper, RequestID/slog middleware, slog handler switch 2026-05-14 19:24:16 +02:00
justfile feat(01-01): justfile with bootstrap, db, migrate, generate, dev, test, lint, build, clean 2026-05-14 17:56:02 +02:00
sqlc.yaml feat(01-01): sqlc config, tailwind input CSS, air live-reload config 2026-05-14 17:54:35 +02:00
tailwind.input.css feat(01-01): sqlc config, tailwind input CSS, air live-reload config 2026-05-14 17:54:35 +02:00