2023-04-30 12:42:20 +09:00

17 lines
312 B
Go

package main
import (
"fmt"
"net/http"
"github.com/syumai/workers"
"github.com/syumai/workers/cloudflare"
)
func main() {
handler := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
fmt.Fprintf(w, "MY_ENV: %s", cloudflare.Getenv(req.Context(), "MY_ENV"))
})
workers.Serve(handler)
}