Skip to content

Latest commit

 

History

History
62 lines (37 loc) · 1.87 KB

README.md

File metadata and controls

62 lines (37 loc) · 1.87 KB

Beer Factory

GitHub repository

Technologies

Introduction

BeerFactory is an API that handles 4 endpoints.
GET Endpoint for fetching all beer records from database.
GET Endpoint for getting one beer record with specified ID.
DELETE Endpoint for deleting beer record with specified ID.
POST Endpoint for inserting beer record from another API using RestTemplate.

Curl Commands

Get All curl command

curl http://localhost:8080/beers/
-H "Accept: application/json"

Get By ID curl command

curl http://localhost:8080/beers/{id}
-H "Accept: application/json"

Post curl command

curl -X POST http://localhost:8080/beers/

Delete By ID curl command

curl -X DELETE http://localhost:8080/beers/{id}

Choices for technologies

I chose to work with MySQL database, because I wanted to take some challenge for myself. In my earlier projects I was using in memory database like H2, and that is why I decided to use MySQL and gain some new knowledge and experience. Also, I wanted to use streams from Java 8 and learn them as much as possible.

Things I would do differently second time

For my second time around, I would add Unit table to database to reduce redundant fields.
Also, I would implement search, paging and sorting for application.
Also, I would do pairing good beers with provided food, and this would also make database a bit different.

Author

Damnjan Askovic