A basic sample application that demonstrates a few things:
-
Writing a Go application for Cloud Foundry
-
Using the Martini web framework
-
Using the cfenv Go library for interacting with CF application metadata and bound services
-
Use of database/sql to interact with a MySQL DB
-
Use of the experimental Cloud Foundry Go Buildpack
The application requires binding to a MySQL service. It also requires you to be running version 6.1 of the CF CLI.
$ cf cs cleardb spark martini-db $ cf push --random-route