ghostream/main.go

31 lines
467 B
Go
Raw Normal View History

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