Skip to content

Commit

Permalink
removed ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
AdiAkhileshSingh15 committed Aug 2, 2023
1 parent 8a69499 commit b8ed884
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/web/.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ DB_USER=postgres
DB_PASS=IMNKyIMdKVtc4bfFloaD
DB_HOST=bookmyroom.ckzlaalx1suy.ap-south-1.rds.amazonaws.com
DB_PORT=5432
SSL_MODE=verify-full
# SSL_MODE=verify-full
PRODUCTION=true
CACHE=true
4 changes: 2 additions & 2 deletions cmd/web/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func run() (*driver.DB, error) {
dbUser := os.Getenv("DB_USER")
dbPass := os.Getenv("DB_PASS")
dbPort := os.Getenv("DB_PORT")
dbSSL := os.Getenv("SSL_MODE")
// dbSSL := os.Getenv("SSL_MODE")

if inProduction == "true" {
app.InProduction = true
Expand Down Expand Up @@ -105,7 +105,7 @@ func run() (*driver.DB, error) {
// connect to database

log.Println("Connecting to database...")
connectionString := fmt.Sprintf("host=%s port=%s dbname=%s user=%s password=%s sslmode=%s", dbHost, dbPort, dbName, dbUser, dbPass, dbSSL)
connectionString := fmt.Sprintf("host=%s port=%s dbname=%s user=%s password=%s", dbHost, dbPort, dbName, dbUser, dbPass)
db, err := driver.ConnectSQL(connectionString)
if err != nil {
log.Fatal("Cannot connect to database! Dying...")
Expand Down

0 comments on commit b8ed884

Please sign in to comment.