Skip to content

Latest commit

 

History

History
50 lines (50 loc) · 950 Bytes

File metadata and controls

50 lines (50 loc) · 950 Bytes

Create .env file from .env.example

cp .env.example .env

Install all Go dependencies

go get -v ./...

Generate and update swagger docs

go get -u github.com/swaggo/swag/cmd/swag
swag init

Dockerization

docker-compose up -d

How to

Run migrations and seeds
go run db/migrate.go
Run tests

install godotenv on your machine

go get github.com/joho/godotenv/cmd/godotenv

and then run tests with godotenv command

godotenv go test ./... -count=1

use flag -count=1 to clear cache

Run linter
go fmt ./...

Run project with live reload

go get -u github.com/cosmtrek/air
type "air" in your command-line

Without live reload

go run main.go