feat: take postgres max conn from connection url

This commit is contained in:
Yanislav Igonin 2021-09-30 20:55:34 +03:00
parent 2cff45875f
commit d4a3422281
2 changed files with 1 additions and 4 deletions

View File

@ -2,4 +2,4 @@ ENV=debug
PORT=3000 PORT=3000
SEED_DB=true SEED_DB=true
IS_RATE_LIMITER_ENABLED=true IS_RATE_LIMITER_ENABLED=true
POSTGRES_URL=postgres://localhost/micrach POSTGRES_URL=postgres://localhost/micrach?pool_max_conns=5

View File

@ -19,8 +19,5 @@ func Init() {
log.Panicln(err) log.Panicln(err)
} }
// TODO: take from config from env var
Pool.Config().MaxConns = 5
log.Println("database - online") log.Println("database - online")
} }