Categorygithub.com/HEEPOKE/generate-db
module
0.0.0-20240206063942-9f998c3b472d
Repository: https://github.com/heepoke/generate-db.git
Documentation: pkg.go.dev

# README

generate-db

Config Environment

cp .env.example .env

Step Build Docker && Run

docker network create Heepoke
docker compose up -d && docker compose logs api --follow

Create DB For test

docker compose -f db-test.yml up -d && docker compose -f db-test.yml logs

Test

go test ./test/... -v
  • coverage test
go test -cover ./test/... -v

Generate Swagger

swag init -g cmd/main.go --output=pkg/docs

Local Swagger Doc Api

http://localhost:6476/apis/docs/index.html

Example DSN Database

  • mysql
usertest:test@tcp(localhost:3306)/test?charset=utf8mb4&parseTime=true&loc=Local
  • postgresql
host=db-postgres-test user=test dbname=test password=test sslmode=disable TimeZone=Asia/Bangkok
  • sqlserver
sqlserver://gorm:LoremIpsum86@localhost:9930?database=gorm
  • mongodb
mongodb://test:test@localhost:27017/test

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author