- gofiber/fiber - Web Framework
- spf13/viper - Config Reader
- ozzo-validation - Go Struct and Field validation
- swaggo/swag - Swagger documentation
- golang-jwt/jwt - JSON Web Token
- midtrans/midtrans-go - Payment Gateway
- go-gorm/gorm - ORM
- MySQL - MySQL Database
- redis/go-redis - Redis
This app required 2 database connection
# run postgreSQL
docker run -d -p 3306:3306 mysql -e MYSQL_ROOT_PASSWORD=masukdb -e MYSQL_DATABASE=go_mini_ecommerce
# run redis
docker run -d -p 6379:6379 redis --requirepass "masukredis"
- Copy config.example.yaml to config.yaml and fill the config
App:
Name:
Version:
Port: :
Environment:
Timeout:
Mysql:
Host:
Port:
User:
Password:
DbName:
MaxIdleConnection:
MaxOpenConnection:
Redis:
Host:
Port:
Password:
Jwt:
SecretKey:
Midtrans:
ServerKey:
- Runing app docker-compose.yaml
$ docker docker-compose up -d --build
- After run this, don't forget to check all container are successfully started
http://localhost:4545/swagger/index.html