Files
OliveTin/internal/httpservers/httpServer.go
T
James Read 3de819a0e9 feature: add prometheus metrics (#268)
* feature: add prometheus metrics

* bugfix: ixed issue with path
2024-04-11 23:23:40 +00:00

22 lines
412 B
Go

package httpservers
import (
config "github.com/OliveTin/OliveTin/internal/config"
)
// StartServers will start 3 HTTP servers. The WebUI, the Rest API, and a proxy
// for both of them.
func StartServers(cfg *config.Config) {
go startWebUIServer(cfg)
if cfg.UseSingleHTTPFrontend {
go StartSingleHTTPFrontend(cfg)
}
if cfg.Prometheus.Enabled {
go StartPrometheus(cfg)
}
startRestAPIServer(cfg)
}