π The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.
Vue dockergolangkanbanknowledge-baseknowledge-managementmarkdownnote-takingnotesnotes-appnotionnuxtnuxtjsoffline-firstoidcpwaselfhostedssovuevuejswiki
Improve error messages
Smaug67397f5a10492311
diff --git a/backend/app/database.go b/backend/app/database.goindex 46a0bd81..7b4a1d25 100644--- a/backend/app/database.go+++ b/backend/app/database.go@@ -23,7 +23,7 @@ func DBConection(config Config, multiStatements bool) (conecction *sql.DB) {conection, err := sql.Open(Driver, User+":"+Password+"@tcp("+Host+":"+Port+")/"+Database+multiStatementsConfig)if err != nil {- panic(err.Error())+ panic(fmt.Sprintf("failed to connect to database: %v", err))}conection.SetConnMaxLifetime(time.Minute * 3)conection.SetMaxOpenConns(10)diff --git a/backend/main.go b/backend/main.goindex d5f07ca2..c9ccfe33 100644--- a/backend/main.go+++ b/backend/main.go@@ -7,6 +7,7 @@ import (func main() {server, application := server.SetupServer()+ fmt.Println("Starting server on port:", application.Config.Port)defer application.DB.Close()server.Run("localhost:" + fmt.Sprintf("%d", application.Config.Port))diff --git a/backend/server/server.go b/backend/server/server.goindex 2a45ee39..b1dd6c0c 100644--- a/backend/server/server.go+++ b/backend/server/server.go@@ -25,9 +25,10 @@ func SetupServer() (*gin.Engine, *app.App) {config := app.Config{}_, err = toml.DecodeFile(absPath, &config)if err != nil {- fmt.Fprintln(os.Stderr, err)+ fmt.Fprintln(os.Stderr, "Error loading config:", err)os.Exit(1)}+ fmt.Println("Loaded configuration from:", absPath, " successfully")// Initialiser l'applicationapplication := app.InitApp(config)