summaryrefslogtreecommitdiff
path: root/cmd/start.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/start.go')
-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