Skip to content

Latest commit

 

History

History

playground

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Examples playground

A single static page that calls every example HTTP controller (products, patterns, and primitives) without hand-building GET/POST URLs.

The Go Deal DSL application is a separate dex-deal-dsl binary with its own UI and PostgreSQL catalog. AI Agent (Python) also has its own UI. Neither UI is included here; Deal DSL Flow implementations still run in all five SDK examples.

Start Dex, then one language example server, then this page. Commands and example-server ports (HTTP 8080 / Worker 8803, Python sync 8081 / 8804) are in ../README.md. Dex web UI ports are dynamic; use the address printed by dexcli dev. Only one language example server can bind 8080 at a time; Python sync can run alongside on 8081.

Start

From this directory:

./start.sh --port 3333 --example-server http://127.0.0.1:8080 --dex-web http://127.0.0.1:8802

Replace 8802 with the web UI port printed by dexcli dev.

Or with defaults only:

./start.sh

Defaults:

Flag / env Default Meaning
--port / PLAYGROUND_PORT 3333 Playground listen port
--example-server / PLAYGROUND_EXAMPLE_SERVER http://127.0.0.1:8080 Example HTTP controller
--dex-web / PLAYGROUND_DEX_WEB http://127.0.0.1:8802 Dex web UI (dexcli dev; pass the printed port)

Example, Python sync example server on 8081:

./start.sh --port 3333 --example-server http://127.0.0.1:8081 --dex-web http://127.0.0.1:8802

The script opens a browser tab to the playground URL after the server is listening. It skips that in CI, when there is no terminal, or if neither macOS open nor Linux xdg-open is available. The page can also change example server and Dex web UI URLs in the header; those values persist in localStorage.

start.sh --print-config prints the three URLs and exits. ./smoke.sh checks that output.

The playground and the example server listen on different ports. Each language example server allows CORS so the browser can call the APIs directly.

Dex Web links

After a flow ID is known, the page links to Dex Web:

  • current run: {dexWeb}/v1/flows/{flowId}
  • specific run: {dexWeb}/v1/flows/{flowId}/{runId}
  • search: {dexWeb}/v1/flows?q=WorkflowId="{flowId}"

Those routes come from web/app/App.tsx.