Feat: show colors by pressing words

This commit is contained in:
Grail Finder
2025-05-02 15:21:28 +03:00
parent 8b768f919b
commit 322743e33d
6 changed files with 48 additions and 33 deletions

View File

@ -16,16 +16,16 @@ func ListenToRequests(port string) error {
ReadTimeout: time.Second * 5,
WriteTimeout: time.Second * 5,
}
fs := http.FileServer(http.Dir("assets/"))
mux.Handle("GET /assets/", http.StripPrefix("/assets/", fs))
//
mux.HandleFunc("GET /ping", handlers.HandlePing)
mux.HandleFunc("GET /", handlers.HandleHome)
mux.HandleFunc("POST /login", handlers.HandleFrontLogin)
//elements
mux.HandleFunc("GET /room/createform", handlers.HandleShowCreateForm)
mux.HandleFunc("GET /room/hideform", handlers.HandleHideCreateForm)
mux.HandleFunc("GET /word/show-color", handlers.HandleShowColor)
slog.Info("Listening", "addr", port)
return server.ListenAndServe()
}