The flagd playground is an application designed to test the behavior of flagd. It allows users to define flags and experiment with various inputs to understand how flagd responds. This tool is particularly useful for developers and testers who are working with flagd in their projects and need a simple and effective way to validate their flag definitions.
To get started with the development of the flagd playground, you'll need to have Node.js installed on your machine.
- Install Node.js version 18 or newer.
- From the root of the project, run
make playground-dev. - Open your browser and navigate to http://localhost:5173/;
Note
This page is mostly unstyled because it inherits the styles from Mkdocs Material.
A new scenario can be added to the playground by following these steps:
- Add a new scenario file during the
./src/scenariosdirectory. - Export a constant that conforms to the
Scenariotype. - Include the scenario in the scenarios objects at
./src/scenarios/index.ts.
Note
Make sure to update the docs once you're ready. This does not happen automatically! Please see below for more information.
Adding the playground app to the docs can be done by running the following command from the root of the project:
make make playground-publishNote
This will build the app and copy the output to the docs.