- introduces auth package, for common (sam, crm) auth handlers
- routes are now generated inside server package, each handler got its own MountRoutes(r chi.Router, middlewares ...func(http.Handler) http.Handler)
- there MountRoute methods are now called from non-generated code so we can inject services to (rest) controllers
For dsn & addr: explicit config via flag has priority over env variables. Final failsafe is hardcoded default values
Env variables:
- SAM_DB_DSN
- SAM_HTTP_ADDR