Nemo D'ACREMONT b54a862e23 first commit
2025-06-01 10:52:57 +02:00

19 lines
329 B
Go

package api
import (
"net/http"
"dacremont.xyz/learnrest/api/messages"
)
type Api struct {}
func NewApi () *http.ServeMux {
mux := http.NewServeMux()
mux.Handle("/messages", messages.NewMessagesAPI())
mux.HandleFunc("GET /hello", func(w http.ResponseWriter, r *http.Request) {w.Write([]byte("World!"))})
return mux
}