add godotenv, regenerate swagger docs
This commit is contained in:
@@ -17,7 +17,7 @@ func Connect() (*pgxpool.Pool, *db.Queries, error) {
|
||||
|
||||
databaseURL := os.Getenv("DATABASE_URL")
|
||||
if databaseURL == "" {
|
||||
databaseURL = "postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable"
|
||||
panic("DATABASE_URL environment variable not set")
|
||||
}
|
||||
|
||||
pool, err := pgxpool.New(ctx, databaseURL)
|
||||
|
||||
Reference in New Issue
Block a user