├── app.yaml └── app.go /app.yaml: -------------------------------------------------------------------------------- 1 | runtime: go113 2 | -------------------------------------------------------------------------------- /app.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | "os" 7 | ) 8 | 9 | func main() { 10 | http.HandleFunc("/", meta) 11 | port := os.Getenv("PORT") 12 | if port == "" { 13 | port = "8080" 14 | } 15 | 16 | log.Printf("Listening on port %s", port) 17 | log.Fatal(http.ListenAndServe(":"+port, nil)) 18 | } 19 | 20 | const metaPage = ` 21 | 22 | ` 23 | 24 | func meta(w http.ResponseWriter, req *http.Request) { 25 | w.Write([]byte(metaPage)) 26 | } 27 | --------------------------------------------------------------------------------