Create a heroku app with go-src buildpack with:
heroku create -s cedar --buildpack git@github.com:kesselborn/heroku-buildpack-go.git
| github.com/soundcloud/gotest |
Create a heroku app with go-src buildpack with:
heroku create -s cedar --buildpack git@github.com:kesselborn/heroku-buildpack-go.git
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "net/http" | |
| ) | |
| func handler(w http.ResponseWriter, r *http.Request) { | |
| fmt.Fprintf(w, "Hi there, I hate %s!", r.URL.Path[1:]) | |
| } | |
| func main() { | |
| port := ":" + os.Getenv("PORT") | |
| if port == ":" { | |
| port = ":8080" | |
| } | |
| fmt.Println("starting web server on port ", port) | |
| http.HandleFunc("/", handler) | |
| http.ListenAndServe(port, nil) | |
| } |
| web: ./bin/gotest |