......
Sử dụng : Docs swagger
Link docs:
-
brew install golang-migrate
-
brew install sqlc
-
go install go.uber.org/mock/mockgen@latest
-
Clone project
git clone https://github.com/hson98/app-chat.git
-
Run Database, Redis
make dockerdb
-
Create file app.env like example.env
-
Run db migration up all versions:
make migrateup
-
Run test:
make test
-
Run server:
make server
- Create file app.env like example.env
make docker
- Gen ra docs api
swag init -g cmd/api/main.go -o ./docs
- Create migration
migrate create -ext sql -dir db/migration -seq init_schema
- Rebuild lại 1 service không bị cache
docker-compose up -d --no-deps --build name_service
- Xóa cache build docker
docker builder prune
- Xóa cache git
git rm -r --cached .