diff --git a/db/db.go b/db/db.go index 1d8bfea..1e0a655 100644 --- a/db/db.go +++ b/db/db.go @@ -19,6 +19,7 @@ func Init() { log.Panicln(err) } + // TODO: take from config from env var Pool.Config().MaxConns = 5 log.Println("database - online") diff --git a/main.go b/main.go index a762a50..03fe7d9 100644 --- a/main.go +++ b/main.go @@ -41,7 +41,8 @@ func main() { instance := limiter.New(store, rate) middleware := mgin.NewMiddleware(instance) - router := gin.Default() + router := gin.New() + router.Use(gin.Recovery()) router.SetFuncMap(template.FuncMap{ "Iterate": func(count int) []int { var i int