A simple micro service that returns trivia questions. This respository is the source code for the Trivia Question microservice playlist on DeegeU.com and YouTube.
You can find more programming videos on the DeegeU channel
The application can be run using the following command. Use the correct version for SNAPSHOT and BUILDNUMBER when running. This will launch the application.
java -jar ./target/deegeu-quizzer.SNAPSHOT.BUILDNUMBER-swarm.jar
The service can be tested using either curl, REST client, or your favorite browser.
Running the command will return a random question at a command prompt.
The starting point for the API is at
curl -I http://localhost:8080/trivia
This code is written and compiled for Java 8.
Building the code
The mvn POM file requires two parameters passed.
mvn clean install -Dproject.version=1.0.0 -Dbuild.number=$BUILD_NUMBER.$GIT_COMMIT
The code can be compiled locally using
mvn clean install -Dproject.version=1.0.0 -Dbuild.number=001
If you wish to contribute to any issues you find in the source code, please issue a pull request.