testhub/main.go

23 lines
474 B
Go

package main
import (
"log"
"net/http"
"git.andreafazzi.eu/andrea/testhub/logger"
"git.andreafazzi.eu/andrea/testhub/store"
"github.com/sirupsen/logrus"
)
const port = "3000"
func main() {
logger.SetLevel(logger.DebugLevel)
server := NewQuizHubCollectorServer(store.NewMemoryQuizHubCollectorStore())
addr := "localhost:" + port
logrus.WithField("addr", addr).Info("TestHub Collector server is listening.")
log.Fatal(http.ListenAndServe(":"+port, server))
}