Remove the /api/string endpoint. Add an endpoint to main.go at /api/number to return a random number between 20 and 50
Make the content section in index.html a different color from the background
Copy the information from the readme to index.html
Resolves #5
- http.HandleFunc("/api/strings", func(w http.ResponseWriter, r *http.Request) {
- toReturn := "asdf"
- fmt.Fprint(w, toReturn)
- })
+ http.HandleFunc("/api/number", func(w http.ResponseWriter, r *http.Request) {
+ randomNumber := rand.Intn(31) + 20
+ fmt.Fprint(w, strconv.Itoa(randomNumber))
+ })
- Existing code line 2
+ New code line 2
- Existing code line 1
+ New code line 1
- Existing code line 2
+ New code line 2
- Existing code line 1
+ New code line 1
- Existing code line 2
+ New code line 2