Slide 26
Slide 26 text
ridgeͰͷ࣮
import "github.com/fujiwara/ridge"
func main() {
var mux = http.NewServeMux()
mux.HandleFunc("/", handleRoot)
ridge.Run(":8080", "/api", mux)
}
func handleHello(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/plain")
fmt.Fprintf(w, "Hello %s\n", r.FormValue("name"))
}
// ͍ͭͲ͓Γͷ࣮ͰΒͪ͘Μ