testhub/main.go

24 lines
474 B
Go
Raw Permalink Normal View History

2022-05-25 12:04:53 +02:00
package main
import (
"log"
"net/http"
2022-05-25 12:21:32 +02:00
2022-05-25 19:24:12 +02:00
"git.andreafazzi.eu/andrea/testhub/logger"
2022-05-25 12:21:32 +02:00
"git.andreafazzi.eu/andrea/testhub/store"
2022-05-26 09:53:08 +02:00
"github.com/sirupsen/logrus"
2022-05-25 12:04:53 +02:00
)
2022-05-25 19:24:12 +02:00
const port = "3000"
2022-05-25 12:04:53 +02:00
func main() {
2022-05-25 19:24:12 +02:00
logger.SetLevel(logger.DebugLevel)
2022-06-17 16:02:58 +02:00
server := NewQuizHubCollectorServer(store.NewMemoryQuizHubCollectorStore())
2022-05-25 19:24:12 +02:00
2022-05-26 09:53:08 +02:00
addr := "localhost:" + port
logrus.WithField("addr", addr).Info("TestHub Collector server is listening.")
2022-05-25 19:24:12 +02:00
log.Fatal(http.ListenAndServe(":"+port, server))
2022-05-25 12:04:53 +02:00
}