This is my implementation of the coding challenge for SevenSenders.
We define a Docker Compose that builds and runs the web application.
Before running it, please make sure that your 8080 port is available.
If not, you need to modify the port mapping in docker-compose.yml
.
After installing Docker Compose on your machine, you can execute the following command from the project's root folder: docker-compose build
.
Warning: The command might take a while to be executed.
For this project, we use the Gradle build tool. But, we use it with a wrapper, so you do not have to install anything! The only requirement is that you need Java 15 installed on your machine.
If you are on a Unix system, you need to execute the following command from the project's root folder: ./gradlew build
.
From Windows, you can use the gradlew.bat
script in the same way: .\gradlew.bat build
.
For more information regarding this script, please refer to the Gradle Wrapper.
As for the build, you can use the Docker Compose file.
You can use the following command: docker-compose up
(no need to build it first).
The building process generates an executable jar file that can be found in build/libs
.
You can directly execute it: java -jar build/libs/strips-<VERSION>.jar
.
There is a publicly available API for the webcomic XKCD – https://xkcd.com/json.html
And an RSS feed for PDL: http://feeds.feedburner.com/PoorlyDrawnLines
Create a RESTful service that pulls last 10 strips from each and combines them in a single json feed (20 recent entries in total). The response should contain the following data for each entry:
- picture url
- title / description
- web url for browser view
- publishing date
Sort the resulting feed by publishing date from recent to older.
The solution should contain a docker-compose configuration to build and run it at http://localhost:8080
We have the following expectations towards your solution.
- It should work
- It is readable and comprehensible
- The code is structured reasonably and the architecture can be justified
- It has tests
The solution sources should be hosted on github. Preferably the commit history should represent your iterative process.
Please don't spend more than a couple of hours on this. We don't expect the solution to be perfect or surprisingly original. We expect it to work.
Good luck!