Small Spring Boot sample. To run the tests you will need to install mysql and create a database called webhack
.
On Mac OS, this can be done with homebrew:
brew install mysql
brew services start mysql
mysql -uroot
Then execute this SQL: CREATE DATABASE webhack;
To deploy on https://run.pivotal.io/, create an account, then:
-
brew tap cloudfoundry/tap
-
brew install cf-cli
-
cf login
-
Use
api.run.pivotal.io
as the API endpoint and login with your credentials. -
After targeting your org, select a space you want to use or create one using
cf create space <name>
-
Assemble the jar using
./gradlew assemble jar
-
cf push <your app name> -p build/libs/webhack-demo-0.0.1-SNAPSHOT.jar
Consider using --random-route
in the cf push command to avoid route conflicts.