- Go 1.18 (though should be backwards compatible with earlier versions)
- Set
SPEAKEASY_SDK_API_KEY={your-api-key}
in your environment. - Set
SPEAKEASY_SDK_WORKSPACE_ID={your-workspace-id}
in your environment.
- From root of the repo
- Run
go mod download
to install dependencies - Run
make db
(docker-compose up -d postgres
) to run the postgres dependency - Run
make local api_key=$(cat ./MyKey.key)
to start the server on port 8081 - Run
make healthcheck
to send the first request through to Speakeasy (a health check)
- From root of the repo
- Run
make docker
will start the dependencies and server on port 8081
I have provided Postman collections for testing out the REST endpoints exposed by the service.
There is a Bootstrap Users
collection that can be run using the Run collection
tool in Postman that will create 100 users to test the search endpoint with.
The collections will need an environment setup with scheme
, port
and host
variables setup with values of http
, 8080
and localhost
respectively.
The service contains a collection of unit and integration tests for testing the various layers of the service. Some of the integration tests use docker to spin up dependencies on demand (ie a postgres db) so just be aware that docker is needed to run the tests.
- From root of the repo
- Run
go test ./...