Create a gist now

Instantly share code, notes, and snippets.

@qushot /app.yaml Secret
Created Sep 6, 2017

What would you like to do?
ファイアウォールルール確認用GAEアプリケーション
application: YOUR_PROJECT_ID
version: X
runtime: go
api_version: go1.8
handlers:
- url: /.*
script: _go_app
package demo
import (
"fmt"
"net/http"
"google.golang.org/appengine"
"google.golang.org/appengine/log"
)
func rootHandler(w http.ResponseWriter, r *http.Request) {
ctx := appengine.NewContext(r)
log.Infof(ctx, "Request from IP Address \"%v\"\n", r.RemoteAddr)
fmt.Fprintln(w, "hello")
}
func init() {
http.HandleFunc("/", rootHandler)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment