diff --git a/.env b/.env deleted file mode 100644 index 99557f8..0000000 --- a/.env +++ /dev/null @@ -1,32 +0,0 @@ -# Used when creating a JWT. It can be anything. -API_SECRET=nyEX8BZ44KqTXeV2 - -# DB configuration DEVELOPMENT -#API_PORT=8111 -#API_RELEASE="Desenvolvimento" -#DB_HOST=177.153.50.98 -#DB_DRIVER=postgres -#DB_USER=pcastdev -#DB_PASSWORD=@407Smc837 -#DB_NAME=pcastdev -#DB_PORT=5432 - -# DB configuration HOMOLOGAÇÃO -#API_PORT=8111 -#API_RELEASE="Homologação" -#DB_HOST=191.252.214.157 -#DB_DRIVER=postgres -#DB_USER=pcasthomolog -#DB_PASSWORD=@407Smc837 -#DB_NAME=pcasthomolog -#DB_PORT=5432 - -# DB configuration PRODUÇÃO -API_PORT=8112 -API_RELEASE="" -DB_HOST=177.153.50.98 -DB_DRIVER=postgres -DB_USER=pcast -DB_PASSWORD=@407Smc837 -DB_NAME=pcast -DB_PORT=5432 diff --git a/database/database.go b/database/database.go index 4fd52b2..c77c787 100644 --- a/database/database.go +++ b/database/database.go @@ -7,8 +7,6 @@ import ( "fmt" "log" - "github.com/joho/godotenv" - "gorm.io/driver/postgres" "gorm.io/gorm" ) @@ -18,14 +16,14 @@ var DB *gorm.DB // ConnectDB - returns a pointer to a new database connection func ConnectDB() error { - var erre error + // var erre error - log.Println("Getting environment values") - erre = godotenv.Load() - if erre != nil { - log.Printf("Error getting env, not comming through %v\n", erre) - return erre - } + // log.Println("Getting environment values") + // erre = godotenv.Load() + // if erre != nil { + // log.Printf("Error getting env, not comming through %v\n", erre) + // return erre + // } driver := config.Configurations.Data.DB_DRIVER user := config.Configurations.Data.DB_USER