oopsie/main.go

16 lines
335 B
Go
Raw Normal View History

package main
import (
"net/http"
)
func main() {
2024-05-05 07:41:01 +00:00
http.HandleFunc("GET /", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("This was a GET request!"))
})
http.HandleFunc("POST /", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("This was a POST request!"))
})
http.ListenAndServe(":8000", nil)
}