The local development requires 3 tooling to provision the project fully.
- golang v1.11+ (required)
- docker-compose (required)
- direnv (optional)
First of all, make sure that the .envrc
file content is sourced into your shell.
The file contains environment variables for local development.
If you have
direnv
installed in your shell, you can skip this step.
. .envrc
docker-compose up -d
Then to install tooling execute the below mentioned next command.
This will install all the tooling in your GOPATH/bin
directory that the depends on.
The .envrc
append your GOPATH/bin
to the PATH
variable.
to vendor tooling the project relies on go modules
go generate tools.go
go generate ./...
go test ./...
go test -bench . ./...
export DATABASE_URL=${TEST_DATABASE_URL_POSTGRES}
go run cmd/toggler/main.go create-token "token-owner-name"
go run cmd/toggler/main.go http-server