Refactor hub initialization and error handling

This commit is contained in:
henrygd
2025-03-15 00:25:42 -04:00
parent c38d04b34b
commit 5837b4f25c
3 changed files with 62 additions and 53 deletions

View File

@@ -5,6 +5,7 @@ import (
"beszel/internal/hub"
_ "beszel/migrations"
"fmt"
"log"
"net/http"
"os"
"time"
@@ -27,8 +28,9 @@ func main() {
baseApp := getBaseApp()
h := hub.NewHub(baseApp)
h.BootstrapHub()
h.Start()
if err := h.StartHub(); err != nil {
log.Fatal(err)
}
}
// getBaseApp creates a new PocketBase app with the default config