From 9c24bdca1fa3f9b1c23791eb00085d20a76b90a3 Mon Sep 17 00:00:00 2001 From: William P Date: Sat, 16 May 2026 20:56:14 +0000 Subject: [PATCH] add postgres connection test --- server/db/postgres.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/db/postgres.go b/server/db/postgres.go index 10d8ba8..395af3b 100644 --- a/server/db/postgres.go +++ b/server/db/postgres.go @@ -17,6 +17,11 @@ func InitPostgres(ctx context.Context) { os.Exit(1) } Pool = pool + err = pool.Ping(ctx) + if err != nil { + slog.Error("Failed to connect to Postgres", "error", err) + os.Exit(1) + } slog.Info("Connected to Postgres") }