My first API project using Go and Gin. This project is a simple RESTful API for managing a collection of music albums, built with Go and the Gin web framework.
- List all albums
- Get a specific album by ID
- Add a new album
- Dockerized for easy deployment
- Go 1.18 or later
- Docker (optional)
- Clone the repository
- Navigate to the project directory
- Run the application:
go run main.go
- The server will start on
localhost:8080
- GET
/albums
: Retrieve all albums - GET
/albums/:id
: Retrieve a specific album - POST
/albums
: Add a new album
- Build the Docker image:
docker build -t golang-album-api .
- Run the container:
docker run -p 8080:8080 golang-album-api
Run the tests using:
got test