testhub/main.go

21 lines
380 B
Go
Raw 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-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)
server := NewPlayerServer(store.NewMemoryPlayerStore())
logger.Infof("The API server is listening to port %s...", port)
log.Fatal(http.ListenAndServe(":"+port, server))
2022-05-25 12:04:53 +02:00
}