Skip to content

Latest commit

 

History

History
63 lines (42 loc) · 1.37 KB

setup.md

File metadata and controls

63 lines (42 loc) · 1.37 KB

Local Development Setup

The local development requires 3 tooling to provision the project fully.

To ensure local development environment variables

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

To ensure project external resource dependencies

docker-compose up -d

To provision tooling for the project (go modules)

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

To generate assets and mocks

go generate ./...

to execute test suite

go test ./...

To execute benchmark suite

go test -bench . ./...

To run the service locally with go compiler

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