diff --git a/config/config.go b/config/config.go index 9d61cd1..0902b9e 100644 --- a/config/config.go +++ b/config/config.go @@ -39,7 +39,7 @@ func getAppConfig() AppConfig { func getDbConfig() DbConfig { url := os.Getenv("POSTGRES_URL") if url == "" { - url = "postgresql://localhost/dumpach" + url = "postgresql://localhost/micrach" } return DbConfig{ Url: url, diff --git a/main.go b/main.go index 73b39d1..fc5d641 100644 --- a/main.go +++ b/main.go @@ -5,7 +5,7 @@ import ( "strconv" "github.com/gin-gonic/gin" - "github.com/joho/godotenv" + _ "github.com/joho/godotenv/autoload" Config "micrach/config" // Controllers "micrach/controllers" @@ -14,18 +14,9 @@ import ( ) func main() { - err := godotenv.Load(".env") - if err != nil { - log.Panicln(err) - } - Config.Init() Db.Init() defer Db.Pool.Close() - // err = Utils.CreateUploadsFolder() - if err != nil { - log.Panicln(err) - } gin.SetMode(Config.App.Env) router := gin.Default()