mirror of
https://github.com/acme-dns/acme-dns.git
synced 2026-02-25 12:55:35 -07:00
23 lines
388 B
Go
23 lines
388 B
Go
package examples
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"google.golang.org/appengine"
|
|
)
|
|
|
|
// GaeHandler creates http.Handler to run in the Google App Engine.
|
|
//
|
|
// Routes:
|
|
// GET /ping return "pong"
|
|
func GaeHandler() http.Handler {
|
|
m := http.NewServeMux()
|
|
|
|
m.HandleFunc("/ping", func(w http.ResponseWriter, r *http.Request) {
|
|
_ = appengine.NewContext(r)
|
|
w.Write([]byte("pong"))
|
|
})
|
|
|
|
return m
|
|
}
|