This repository is implement clean code architecture and Restful API concept. Use Fiber Go as HTTP library and GORM for ORM library. For database, this app is use MySQL and redis for cache and session.
For database schema you can see in below:
- golang version 1.22.1
- MySql
- redis server
- Setup MySQL and redis server in your local computer
- Clone this repository
https://github.com/ajaydeta/golang-clean-code-rest.git
- Installing main project dependency
go mod tidy
- Running the server
go run main.go
- Setup MySQL and redis server in your local computer
- Clone this repository
https://github.com/ajaydeta/golang-clean-code-rest.git
- Compose Up
docker compose up --build
This app is running on port
:3000
After this app is running, this app will automatically migrate DB schema and seed dummy data for testing purpose. Then you can see the API documentation in here.
Ajay Deta: