# README
Golang API Project - Book Store
This project implements a Golang API for a Book Store, providing various routes for managing books.
Routes
Create Book
Endpoint: POST /book/
Creates a new book in the store.
Get Book
Endpoint: GET /book/
Retrieves a list of all books in the store.
Get Book by ID
Endpoint: GET /book/{bookId}
Retrieves details of a specific book based on the provided bookId
.
Update Book
Endpoint: PUT /book/{bookId}
Updates the details of a specific book based on the provided bookId
.
Delete Book
Endpoint: DELETE /book/{bookId}
Deletes a specific book from the store based on the provided bookId
.
Usage
To use this API, follow these steps:
-
Clone the repository:
git clone https://github.com/Cyberguru1/Go-BookStore
-
Install required dependencies:
cd Go-BookStore go mod download
-
Configure the database: Update the database connection details in
config/config.go
. -
Build and run the application:
go build ./cmd/main/main
-
Access the API: Use tools like
curl
, Postman, or your web browser to interact with the API using the provided routes.
Dependencies
This project uses the following libraries/frameworks:
- gorilla/mux: A powerful HTTP router and URL matcher for building web applications.
- gorm
Contributing
Contributions are welcome! If you find any issues or have suggestions, feel free to open an issue or submit a pull request.
License
This project is licensed under the MIT License.