A Java/MySQL API which allows you to CRUD a cocktail list and their ingredients.
222
For the double-strain-api container, you must define env. variables in the docker-compose.yml file :
DOUBLE_STRAIN_DB_URL: jdbc:mysql://double-strain-db:3306/double_strain?serverTimezone=UTC-5
DOUBLE_STRAIN_DB_USR: double_strain_app
DOUBLE_STRAIN_DB_PWD: double_strain_app
And for the MySQL container as well :
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: double_strain
MYSQL_USER: double_strain_app
MYSQL_PASSWORD: double_strain_app
Then, run the command "docker-compose up"
(GET) localhost:8080/ingredients/all
(GET) localhost:8080/ingredients?name={param}
(GET) localhost:8080/ingredients/{param}
(POST) localhost:8080/ingredients/
{
"name": {param},
"ingredientType": {
"name": {param}
}
}
(PUT) localhost:8080/ingredients/{param}
{
"ingredientType": {
"ingredientTypeId": {param}
}
}
(DELETE) localhost:8080/ingredients/{param}
(DELETE) localhost:8080/ingredients?name={param}
(GET) localhost:8080/cocktails/all
(GET) localhost:8080/cocktails?name={param}
(GET) localhost:8080/cocktails/{param}
(POST) localhost:8080/cocktails
{
"name": {param},
"description": {param},
"glassType": {
"glassTypeId": {param}
},
"mixingTechnique": {
"mixingTechniqueId": {param}
},
"strength": {
"strengthId": {param}
},
"cocktailIngredients": [
{
"ingredient": {
"ingredientId": {param}
},
"amount": {param},
"unit": {
"unitId": {param}
}
},
{
"ingredient": {
"ingredientId": {param}
},
"amount": {param},
"unit": {
"unitId": {param}
}
}
]
}
(PUT) localhost:8080/cocktails/{param}
{
"cocktailIngredients": [
{
"cocktailIngredientId": {
"cocktailId": {param},
"ingredientId": {param}
},
"ingredient": {
"ingredientId": {param},
"name": {param},
"ingredientType": {
"ingredientTypeId": {param},
"name": {param}
}
},
"amount": {param},
"unit": {
"unitId": {param},
"name": {param}
}
}
]
}
(DELETE) localhost:8080/cocktails/{param}
(GET) localhost:8080/ingredientTypes/all
(GET) localhost:8080/glassTypes/all
(GET) localhost:8080/mixingTechniques/all
(GET) localhost:8080/strengths/all
(GET) localhost:8080/units/all
Content type
Image
Digest
sha256:8ff1482be…
Size
166.6 MB
Last updated
over 3 years ago
docker pull cobalt95117/double-strain-api