diff options
Diffstat (limited to 'src/rest-api/cmd/main.go')
-rw-r--r-- | src/rest-api/cmd/main.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rest-api/cmd/main.go b/src/rest-api/cmd/main.go index c58d353..2fcd1ec 100644 --- a/src/rest-api/cmd/main.go +++ b/src/rest-api/cmd/main.go @@ -8,9 +8,13 @@ import ( ) func main() { - http.HandleFunc("/", handleRequest) + mux := http.NewServeMux() + mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + fmt.Fprint(w, "Hello folks!") + }) + mux.HandleFunc("/payload", handleRequest) - http.ListenAndServe(":8080", nil) + http.ListenAndServe(":8080", mux) } func handleRequest(w http.ResponseWriter, r *http.Request) { |