Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package main
import (
"fmt"
"net/http"
)
func userHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "User Service Response")
}
func main() {
http.HandleFunc("/users", userHandler)
fmt.Println("User Service running on :8080")
http.ListenAndServe(":8080", nil)
}Coding works best on desktop or with an external keyboard.