package config import ( "os" ) // Config holds application configuration loaded from the environment. type Config struct { DatabaseURL string Port string } // Load reads configuration from environment variables. // DATABASE_URL is required; PORT defaults to "3000". func Load() *Config { dbURL := os.Getenv("DATABASE_URL") if dbURL == "" { dbURL = "postgres://osdb:osdb@localhost:5432/osdb?sslmode=disable" } port := os.Getenv("PORT") if port == "" { port = "3000" } return &Config{ DatabaseURL: dbURL, Port: port, } }