package config import ( "fmt" "os" ) type Config struct { DatabaseURL string HTTPPort string } func Load() (*Config, error) { url := os.Getenv("DATABASE_URL") if url == "" { return nil, fmt.Errorf("DATABASE_URL is required") } port := os.Getenv("HTTP_PORT") if port == "" { port = "8000" } return &Config{ DatabaseURL: url, HTTPPort: port, }, nil }