Skip to content

chaiyawatkit/clean-architecture-gorm-mysql

Repository files navigation

Go Clean-Architecture-Gorm-Mysql

Manual Installation

Clone the repo:

1. git clone https://github.com/chaiyawatkit/clean-architecture-gorm-mysql.git
2. cp config.json.example config.json
3. docker-compose up  --build  -d

Features

  • Golang v1.21: Stable version of go

  • Framework: A stable version of gin-go

  • Token Security: with JWT

  • API documentation: with swaggo of swagger

  • SQL databaseSQL: MariaDB using internal sql package of go sql

  • Testing: unit and integration tests using package of go testing

  • Dependency management: with go modules

  • Environment variables: using viper

  • Docker support

Commands

Swagger Implementation

install swaggo/swag

go install github.com/swaggo/swag/cmd/swag@latest

touch ~/.bash_profile;  open ~/.bash_profile

copy paste  export PATH=$PATH:$(go env GOPATH)/bin to bash_profile

Generate swagger documentation

swag init -g src/infrastructure/rest/routes/routes.go

use swagger documentation

http://localhost:8080/v1/swagger/index.html

swagger

About

clean-architecture-gorm-mysql

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published