A RESTful web-api service which contains all the basic CRUD APIs for any book-service application. This project uses Go and Gin as it's web framework and is implemented on ports and adapters pattern (hexagonal architecture).
- GET /books :- Get all books
- GET /books/:id :- Get only single book with given ID
- POST /books :- Create/Post new Books
- PATCH /books/:id :- Updates the given book with given ID
- DELETE /books/:id :- Delete the book with given ID
- Go
- Gin Web Framework
- MySQL Database
- GORM
STEP 1: Open git bash or git CLI in your machine
STEP 2: Clone this repository using command -
git clone https://github.com/Vivayush/harshit-golang-bookservice.git
STEP 3: Open the project folder or directory in VS Code or any other editor.
STEP 3: Open the VS code terminal and install all the dependencies using command-
go get .
STEP 4: Get inside the src folder and run the command -
go run main.go
Your Application will be up and running on the http://localhost:3000 server.