REST-API for Fizz Buzz Game
- to build : > mvn clean install
- to run : > mvn spring-boot:run
The app is configured to run on port 8081, if the local port is occupied, modify the > server.port property in > src/main/resources/application.properties
Use the url to access the game api, if the app is running in default port
http://localhost:8081/rest-api?A=15 (query parameter A=15 is the number given to the game app to generate Fizz Buzz series, add more pairs by using unique keys as query parameters)
Prerequisites Follow the steps to install Heroku cli : 1. Heroku Introduction 2. Set Up
- Login to Heroku : > heroku login
- Clone this git repo to a directory
- Create a app in heroku : > heroku create {optional name}
- at this step, heroku would add another remote repository to the git repo in local, check it by using the command "git remote -v", should show two remote repo urls. Good lets move on.
- note down the endpoint of the app, it is required to access the application.
- Push the code to heroku remote : > git push heroku master
- wait for a while to let heroku builds the project, once it shows "remote: Verifying deploy.... done.", its done.
- Start a dyno to run the app : > heroku ps:scale web=1
- Tail the logs from heroku use : > heroku logs --tail
- Once the testing is done, scale down the dyno : > heroku ps:scale web=0
Launch a browser / terminal, use the url (https://<end point from step 3>/rest-api?A=30)