Use this command:
docker-compose up -d
You can get api via http://localhost:8080
- Install go
- Install godep
- Install golangci-lint
- Install dependencies
make dep
- Run linter
make lint
- Run db for local dev
docker \
run \
-d \
-e POSTGRES_DB=app \
-e POSTGRES_USER=user \
-e POSTGRES_PASSWORD=password \
-p "5432:5432" \
postgres
- Declare env variables
export DB_HOST="your_db_ip"
export DB_PORT="your_db_port"
export DB_USER="your_db_user"
export DB_NAME="your_db_name"
export DB_PASSWORD="your_db_password"
- Run tests
make test
- Build the app
make build
- Run the app
./app
- Stop the app
ctrl + c
- Remove the binary
make clean