- labstack/echo - as http framework
- go-gorm/gorm - as ORM
- spf13/viper - as config configuration
- uber-go/zap - as logger
- go-playground/validator - as validator
- swaggo/swag - as api documentation
Run docker-compose.yaml
$ make docker-compose
or
$ docker docker-compose up -d --build
- After run this, don't forget to check all container are successfully started
- There are 2 container, api_service and database
- Create database container
$ make local
or
docker-compose -f docker-compose.local.yaml up -d
- Run Service
$ make run
or
$ go run cmd/main.go
- If use other container database, please set config file in config/config.yaml
Mysql:
Host: localhost
Port: 3306
User: root
Password: masukdb
DbName: api_product
MaxIdleConnection: 10
MaxOpenConnection: 100
http://localhost:7070/swagger/index.html