Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| src | ||
| .eslintrc.cjs | ||
| README.md | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
README.md
flagd playground
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.
Development
Getting Started
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.
Add a new scenario
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 Playground to the Docs
Adding the playground app to the docs can be done by running the following command from the root of the project:
make make playground-publish
[!NOTE] This will build the app and copy the output to the docs.