mirror of
https://github.com/sascha-hemi/spaceDevices.git
synced 2026-03-21 06:06:09 +01:00
more error logging
This commit is contained in:
@@ -42,10 +42,14 @@ func StartWebService(conf conf.ServerConf, _devices *mqtt.DeviceData, _macDb db.
|
||||
})
|
||||
|
||||
addr := fmt.Sprintf("%s:%d", conf.Host, conf.Port)
|
||||
var err error
|
||||
if conf.Https {
|
||||
router.RunTLS(addr, conf.CertFile, conf.KeyFile)
|
||||
err = router.RunTLS(addr, conf.CertFile, conf.KeyFile)
|
||||
} else {
|
||||
router.Run(addr)
|
||||
err = router.Run(addr)
|
||||
}
|
||||
if err != nil {
|
||||
logger.Error("gin exit", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user