forked from Team-Ortix/StatusApp
19 lines
348 B
Go
19 lines
348 B
Go
package main
|
|
|
|
import (
|
|
"status/server"
|
|
)
|
|
|
|
func main() {
|
|
cfg, err := ReadConfig("config.json")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
go checkLoop(cfg.Targets)
|
|
validServices := make([]string, 0, len(cfg.Targets))
|
|
for _, v := range cfg.Targets {
|
|
validServices = append(validServices, v.ServiceName)
|
|
}
|
|
server.StartServer(cfg.Port, validServices)
|
|
}
|