1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-02-06 04:22:59 +00:00
ghostream/main.go

31 lines
476 B
Go
Raw Normal View History

2020-09-21 17:29:50 +02:00
package main
import (
2020-09-21 19:59:41 +02:00
"log"
"gitlab.crans.org/nounous/ghostream/internal/config"
2020-09-21 21:38:11 +02:00
"gitlab.crans.org/nounous/ghostream/internal/monitoring"
2020-09-21 17:47:31 +02:00
"gitlab.crans.org/nounous/ghostream/web"
2020-09-21 17:29:50 +02:00
)
func main() {
2020-09-21 19:59:41 +02:00
// Load configuration
cfg, err := config.New()
if err != nil {
log.Fatal(err)
}
2020-09-21 21:05:45 +02:00
// Start web server routine
go func() {
web.ServeHTTP(cfg)
}()
2020-09-21 21:33:32 +02:00
// Start monitoring server routine
go func() {
monitoring.ServeHTTP(cfg)
}()
2020-09-21 21:05:45 +02:00
// Wait for routines
select {}
2020-09-21 17:29:50 +02:00
}