Project POS App is chapter 50-55 Team Project
clone this project and install dependencies
go mod tidy
copy .env.example to .env
copy .env.example .env
by default, migration and seeding are disabled
to enable them, set DB_MIGRATION
and DB_SEEDING
in .env
to true
to disable, set DB_MIGRATION
and DB_SEEDING
in .env
to false
to overrides .env
, use flags -m
and -s
cd cmd
go run . -m -s
The flag -m
overrides .env DB_MIGRATE
and flag -s
overrides .env DB_SEEDING
.env | flag | result |
---|---|---|
✅ | ✅ | flag |
✅ | ❌ | .env |
❌ | ✅ | flag |
❌ | ❌ | default |
to generate swagger API documentation, from project root, run
swag init -g cmd/main.go
Note
The generated swagger docs won't be committed to this project repository
to run cron jobs, go to folder cmd/cron
cd cmd/cron
go run .