github.com/cloudcredo/cloudrocker@v0.0.0-20160108110610-1320f8cc2dfd/sample-apps/go/app.go (about) 1 package main 2 3 import ( 4 "fmt" 5 "log" 6 "net/http" 7 "os" 8 ) 9 10 func main() { 11 http.HandleFunc("/", hello) 12 err := http.ListenAndServe(":"+os.Getenv("PORT"), nil) 13 if err != nil { 14 log.Fatal("ListenAndServe:", err) 15 } 16 } 17 18 func hello(w http.ResponseWriter, req *http.Request) { 19 fmt.Fprintln(w, "CloudCredo for all your Cloud Foundry and BOSH consultancy needs!") 20 }