This is a simple Web API for Books implemented in Golang. It provides RESTful endpoints for CRUD operations on book resources.
- Create, Read, Update, Delete (CRUD): Perform basic CRUD operations on book resources.
- Get All Books:
GET /api/books
- Get a Single Book:
GET /api/books/{id}
- Create a Book:
POST /api/books
- Update a Book:
PUT /api/books/{id}
- Delete a Book:
DELETE /api/books/{id}
- Golang: Backend implementation.
- Gorilla Mux: Routing and HTTP request handling.
- UUID: Generating unique identifiers.
- Ensure Go v1.22.2 is installed.
- Clone the repository:
git clone https://github.com/zurnov/go-book-web-api
- Install dependencies:
go mod download
- Start the server:
go run main.go
- The server will be running on port 8000.
Returns a collection of all books recorded in the system.
Returns data for a single book by the given identifier.
Creates a new book.
Updates the information for an already added book in the database.
Deletes a book by identifier.