Sign inSign up

cobalt95117/double-strain-api

By cobalt95117

•Updated over 3 years ago

A Java/MySQL API which allows you to CRUD a cocktail list and their ingredients.

Image
0

222

cobalt95117/double-strain-api repository overview

⁠You need to compose with a MySQL image.

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"

⁠Route list :

  • Ingredients

(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}

  • Cocktails

(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}

  • Ingredient types

(GET) localhost:8080/ingredientTypes/all

  • Glass types

(GET) localhost:8080/glassTypes/all

  • Mixing techniques

(GET) localhost:8080/mixingTechniques/all

  • Strengths

(GET) localhost:8080/strengths/all

  • Units

(GET) localhost:8080/units/all

Tag summary

Content type

Image

Digest

sha256:8ff1482be…

Size

166.6 MB

Last updated

over 3 years ago

docker pull cobalt95117/double-strain-api