This example contains everything you need to use PostgreSQL
as the source for your flags.
As you can see the main.go
file contains a basic HTTP server that expose an API that use your flags.
All commands should be run in the root level of the repository.
- Load all dependencies
make vendor
- Run the PostgreSQL container provided in the
docker-compose.yml
file.
docker compose -f ./example/retriever_postgresql/docker-compose.yml up
The container will run an initialization script that populates the database with example flags
- Run the example app to visualize the flags being evaluated
go run ./examples/retriever_postgresql/main.go
- Play with the values in the configured MongoDB documents to see different outputs