From 8d66ec58e2256412a2fd50ad9e651c09af1ea8cc Mon Sep 17 00:00:00 2001 From: GrailFinder Date: Sun, 28 Apr 2024 07:03:36 +0300 Subject: Feat: auth middleware; login [wip] --- cmd/start.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/start.go b/cmd/start.go index a1f051c..5d2f5b9 100644 --- a/cmd/start.go +++ b/cmd/start.go @@ -31,7 +31,8 @@ var startCmd = &cobra.Command{ cfg := config.LoadConfig(viper.GetViper()) db, err := database.InitWithMigrate(cfg.DBURI, true) if err != nil { - panic(err) + log.Error("failed to connect to db", "error", err) + return } srv := server.NewServer(cfg, log, db.Conn) // listen for new messages -- cgit v1.2.3