Running with docker-compose !!!!!!!
April 27, 2026 ยท View on GitHub
Clean architecture and Level 3 of REST
An application of studies on the implementation of clean architecture with golang with a plus of REST level 3 implementations.
Getting Started
Prerequisites
To run this project in the development mode, you'll need to have a basic environment to run:
- A Golang SDK, that can be found here.
Installing
Cloning the Repository
git clone https://github.com/booscaaa/golang-clean-arch-hateoas-example
cd github.com/booscaaa/golang-clean-arch-hateoas-example
Rename config.example.json to config.json
config.json - this is my heroku app
{
"database": {
"url": ""
},
"hateoas": {
"base": "https://todo-list-hateoas.herokuapp.com"
}
}
Running with docker-compose !!!!!!!
docker-compose up --build -d
Running local
go mod tidy
go run main.go
Testing
go mod tidy
go test -v ./...
To get test coverage
go test -v -coverprofile cover.out ./...
go tool cover -html=cover.out -o cover.html
To get new mocks for testing
mockgen -source=core/domain/item.go -destination=core/domain/mocks/fake_item_repository.go -package=mocks
URLs to show the aplications
- API = http://YOUR_MACHINE_IP:<CONFIG_JSON_PORT>
To access the endpoints documentation
Api application built With
License
This project is licensed under the MIT License - see the LICENSE.md file for details