removed .env file
parent
1735361441
commit
44d2aa56ae
32
.env
32
.env
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue