19 lines
313 B
Go
19 lines
313 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
"net/http"
|
|
)
|
|
|
|
func main() {
|
|
mux := http.NewServeMux()
|
|
|
|
mux.HandleFunc("GET /hello", func(w http.ResponseWriter, r *http.Request) {
|
|
log.Println("Received request on /hello endpoint")
|
|
fmt.Fprintf(w, "Hello world from service A")
|
|
})
|
|
|
|
http.ListenAndServe(":8080", mux)
|
|
}
|