17 lines
297 B
Go
Raw Normal View History

2022-08-02 23:47:02 +09:00
package main
import (
"fmt"
"net/http"
"github.com/syumai/workers"
2022-11-19 23:12:03 +09:00
"github.com/syumai/workers/cloudflare"
2022-08-02 23:47:02 +09:00
)
func main() {
handler := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
2024-04-17 00:56:47 +09:00
fmt.Fprintf(w, "MY_ENV: %s", cloudflare.Getenv("MY_ENV"))
2022-08-02 23:47:02 +09:00
})
workers.Serve(handler)
}