probo/main.go

28 lines
602 B
Go

package main
import (
"log"
"net/http"
"git.andreafazzi.eu/andrea/probo/hasher/sha256"
"git.andreafazzi.eu/andrea/probo/logger"
"git.andreafazzi.eu/andrea/probo/store/memory"
"github.com/sirupsen/logrus"
)
const port = "3000"
func main() {
logger.SetLevel(logger.DebugLevel)
server := NewQuizHubCollectorServer(
memory.NewMemoryQuizHubCollectorStore(
sha256.NewDefault256Hasher(sha256.DefaultSHA256HashingFn),
),
)
addr := "http://localhost:" + port
logrus.WithField("address", addr).Info("Probo Collector is up&running...")
log.Fatal(http.ListenAndServe(":"+port, server))
}