Push Local Changes
Page last updated:
Page last updated:
In this step you’ll learn how to propagate a local change to the application through to Cloud Foundry. As a simple change, we’ll modify the message which the app shows.
Change the IndexHandler
’s message in main.go
to “I am awesome!”. Your final result should look something like this:
func IndexHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "I am awesome!")
}
Now test locally:
$ go run main.go
Visiting your application at http://localhost:8080, you should see the changed message. You are awesome!
Now deploy. All you need to do is cf push
again:
$ cf push my-go-app
Finally, check that everything is working by visiting your app’s URL from your web browser.
View the source for this page in GitHub