package server import ( _ "go.uber.org/automaxprocs" "go.uber.org/zap" "server/core" "server/global" "server/initialize" ) // InitBackend initializes the Go backend (Viper, Zap, GORM, Gin) and starts the // HTTP server in a background goroutine. It does not block. Call this before // running the Wails application. func InitBackend() { global.GVA_VP = core.Viper() initialize.OtherInit() global.GVA_LOG = core.Zap() zap.ReplaceGlobals(global.GVA_LOG) global.GVA_DB = initialize.Gorm() initialize.Timer() initialize.DBList() if global.GVA_DB != nil { initialize.RegisterTables() } initialize.InitUHFDevices() go core.RunWindowsServer() }