ℹ️ This project was created as a study base for the Go language and its main frameworks and libraries. It's an open source project, so feel free to participate with ideas and code by creating issues and submitting pull requests.
- Golang
- Zap Logger
- Viper Environment Variables
- Gin Web Framework
- Database Postgres
- ORM Gorm
- ElephantSQL - PostgreSQL as a Service
- TablePlus - GUI tool for relational databases
- Setup Golang
mkdir soccer-betting && cd soccer-betting && go mod init soccer-betting
- Setup Environment Variables
go get github.com/spf13/viper
- Setup Web API
go get -u github.com/gin-gonic/gin
- Setup Logger
go mod init soccer-betting
- Setup Database/GORM
go get -u gorm.io/gorm
go get -u gorm.io/driver/postgres
- Install Go
- Clone project
git clone https://github.com/fabianogoes/soccer-betting && cd soccer-betting
- Download dependency
soccer-betting
- Let's Code!
api/ - handlers, routers
|-dto - request models, response models
cmd/ - bootstrap application
domain/
|-models - Domain classes(entitites...)
|-usecases - Business rules
configuration/ - Frameworks and lib settings: database, loading environments variables, logging, web server, etc...