Enha: bot guesser

This commit is contained in:
Grail Finder
2025-05-29 11:46:40 +03:00
parent 9ebce0a7d0
commit 7fab000d20
4 changed files with 64 additions and 28 deletions

View File

@ -11,10 +11,9 @@ import (
func ListenToRequests(port string) error {
mux := http.NewServeMux()
server := &http.Server{
Handler: handlers.LogRequests(handlers.GetSession(mux)),
Addr: port,
ReadTimeout: time.Second * 5,
// WriteTimeout: time.Second * 5,
Handler: handlers.LogRequests(handlers.GetSession(mux)),
Addr: port,
ReadTimeout: time.Second * 5,
WriteTimeout: 0, // sse streaming
}
fs := http.FileServer(http.Dir("assets/"))
@ -23,7 +22,6 @@ func ListenToRequests(port string) error {
mux.HandleFunc("GET /ping", handlers.HandlePing)
mux.HandleFunc("GET /", handlers.HandleHome)
mux.HandleFunc("POST /login", handlers.HandleFrontLogin)
// mux.HandleFunc("GET /room", handlers.HandleRoomEnter)
mux.HandleFunc("POST /join-team", handlers.HandleJoinTeam)
mux.HandleFunc("GET /end-turn", handlers.HandleEndTurn)
mux.HandleFunc("POST /room-create", handlers.HandleCreateRoom)