SquidSpirit a4394eea9e
All checks were successful
Frontend CI / build (push) Successful in 1m56s
BLOG-43 feat: get all posts
2025-03-28 00:02:34 +08:00

22 lines
298 B
Go

package env
import (
"os"
)
func GetPort() string {
port, exists := os.LookupEnv("PORT")
if !exists {
return "8000"
}
return port
}
func GetDSN() string {
dsn, exists := os.LookupEnv("DSN")
if !exists {
return "postgres://postgres@127.0.0.1/postgres?sslmode=disable"
}
return dsn
}