19 lines
347 B
Go
Raw Normal View History

2025-01-05 02:53:54 +01:00
package web
import (
"fmt"
"net/http"
"git.kapelle.org/niklas/beerpong-elo/internal/repo"
)
func CreateWebserver(repo repo.Repo) *http.ServeMux {
router := http.NewServeMux()
router.HandleFunc("GET /hello", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello, you've requested: %s\n", r.URL.Path)
})
return router
}