summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorGrailFinder <wohilas@gmail.com>2024-04-28 07:03:36 +0300
committerGrailFinder <wohilas@gmail.com>2024-04-28 07:03:36 +0300
commit8d66ec58e2256412a2fd50ad9e651c09af1ea8cc (patch)
tree23ad5c78ba2b2da32628e9004fe932e6fa63e26b /cmd
parentb33be53ea9c0be523988a9412fd8e3f6a24782b3 (diff)
Feat: auth middleware; login [wip]
Diffstat (limited to 'cmd')
-rw-r--r--cmd/start.go3
1 files changed, 2 insertions, 1 deletions
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