Skip to content

Commit 7a65b58

Browse files
committed
tesing db connection
1 parent 0e97f37 commit 7a65b58

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dbFlow/db.circulation.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ func ConnectHackDatabase() *gorm.DB {
2121
dsn := fmt.Sprintf("host=%s port=%s user=%s password=%s dbname=%s sslmode=disable",
2222
dbHost, dbPort, dbUsername, dbPassword, dbName)
2323

24+
fmt.Println("dsn : ", dsn)
25+
2426
// Attempt to connect to the database
2527
db, err := gorm.Open(postgres.Open(dsn), &gorm.Config{})
2628
if err != nil {
27-
log.Fatalf("failed to connect database: %v", err)
29+
log.Printf("failed to connect database: %v", err)
2830
}
2931

3032
// Optionally, you can enable automatic migrations

0 commit comments

Comments
 (0)