From 795f10529bdcdbe6dafb88fd0b5d5ade8afb93dd Mon Sep 17 00:00:00 2001 From: Arpit Bhayani Date: Wed, 11 Dec 2024 13:24:40 +0530 Subject: [PATCH] Production mode through ENVIRONMENT var --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index b479336..9d60133 100644 --- a/main.go +++ b/main.go @@ -15,6 +15,11 @@ import ( ) func main() { + // Set Gin to release mode for production + if os.Getenv("ENVIRONMENT") == "production" { + gin.SetMode(gin.ReleaseMode) + } + configValue := config.LoadConfig() diceDBAdminClient, err := db.InitDiceClient(configValue, true) if err != nil {