Slide 19
Slide 19 text
ridge 51
https://github.com/fujiwara/ridge
LambdaのFunctionURL/ALB/API GatewayをGoの標準httpモジュールで書けるやつ
import (
"net/http"
"github.com/fujiwara/ridge"
)
func main() {
var mux = http.NewServeMux()
mux.HandleFunc("/", handleRoot)
ridge.Run(":8080", "/", mux)
}
func handleRoot(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/plain")
fmt.Fprintln(w, "Hello World")
fmt.Fprintln(w, r.URL)
}