# `mix demo_director.play`
[🔗](https://github.com/ralmidani/demo_director/blob/v0.1.5/lib/mix/tasks/demo_director.play.ex#L1)

Prints a URL you can open (or click in your terminal) that plays a
saved DemoDirector demo against the running dev server.

Opening the URL takes the browser through the demo's `@start_at`
page with the demo's JS stashed in `sessionStorage`. The overlay
consumes it on load and runs the demo end-to-end.

## Usage

    mix demo_director.play <name>

Where `<name>` is the basename of an `.exs` file in `priv/demos/`
(or, when running this package's own demos, `dev/priv/demos/`).

Pass `--path PATH` to verify a script outside the default lookup:

    mix demo_director.play onboarding --path dev/priv/demos/onboarding.exs

Pass `--url URL` to override the printed URL entirely:

    mix demo_director.play onboarding --url http://localhost:4000/dev/director/demos/onboarding/play

By default the task derives the URL from a probe of the running
server. Set `DD_HOST` (default `http://localhost:4000`) for non-default
hosts/ports.

The dev server must already be running.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
