Github repo https://github.com/acurvers/code-challange
- Based on the dropwizard example (standard dropwizard setup)
- Uses H2 in memory database
- Project uses just one domain object
FlightSchedule
found at /flightschedule - Demonstrates the REST API and search implementation
- jre/jdk-11
No setup required
TODO add API doc (swagger?)
/flightschedule
- POST; Create a new
flightschedule
- GET; Returns all
flightschedules
- POST; Create a new
/flightschedule/search
- GET; Searches
flightschedules
Returns foundflightschedules
- GET; Searches
There is a /dist directory which contains all the files
Just use the run.cmd
or source run.sh
in the dist directory
Or use: java -jar dist\booking-coding-challenge-1.0.0-SNAPSHOT.jar server booking.yml
Should now be running on https://localhost:8943
(SSH)
Alternatively use dockerfile to run as docker container
source docker_build_run.sh
or docker_build_run.cmd
Use junit / IT test or
can be tested with Postman, import the "Booking coding challenge.postman_collection.json"
Data in DB:
Non default ports to prevent conflicts
- 8680 HTTP (main application port)
- 8943 HTTPS (main application port)
- 8082 HTTP (admin connector)
- 8445 HTTPS (admin connector)
a lot of things have been omitted and even what I have built is just PoC / WIP.
Database can be cleared with:
java -jar dist\booking-coding-challenge-1.0.0-SNAPSHOT.jar db drop-all booking.yml --confirm-delete-everything
Recreated with:
Init h2 DB:
java -jar dist\booking-coding-challenge-1.0.0-SNAPSHOT.jar db migrate booking.yml
Wrong java version then add the full path to Java
For example on Windows: "C:\Program Files\Java\jdk-11.0.1\bin\java.exe" -jar booking-coding-challenge-1.0.0-SNAPSHOT.jar server booking.yml
For dev work: add -Dmdep.analyze.skip=true
if this maven plugin gives trouble
mvn compile -Dmdep.analyze.skip=true -f pom.xml