Skip to content

Damnjan998/beerFactory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages