An API solution that provides lunch options from a set of recipes based on ingredients available.
$ git clone <project>
$ cd <project>
$ ./gradlew run
docker run -p=8080:8080 docker.pkg.github.com/albertoeks/foodstuffs/docker-foodstuffs:latest
Once everything has started up, you should be able to access the webapp via http://localhost:8080/lunch
Important note:
There is an optional parameter called
date.
If this parameter hasn't explicitly used, it will be considered the date as today.
Otherwise, the date considered will be that used via parameter.
Without parameter
http://localhost:8080/lunch
With parameter date (YYYY-MM-d):
http://localhost:8080/lunch?date=2019-10-10
$ ./gradlew clean test
-
The recipes is ordered by the number of ingredients between
best-beforeanduse-by. -
All the recipes that contains any ingredient expired (based on
use-by) will be ignored.