# `PhiaUiDesign.Web.Endpoint`
[🔗](https://github.com/charlenopires/PhiaUI/blob/v0.1.17/lib/phiaui_design/web/endpoint.ex#L1)

Phoenix Endpoint for the PhiaUI Design tool.

Runs on a dedicated port (default 4200), completely independent of the
host application's endpoint. All configuration is programmatic — no
config files are required.

## Static assets

Three Plug.Static mounts serve the required JavaScript:

1. `/assets` — the design tool's own JS (hooks, bootstrap).
2. `/assets/vendor/phoenix` — the pre-built Phoenix channel client
   from the `phoenix` dependency.
3. `/assets/vendor/phoenix_live_view` — the pre-built LiveView client
   from the `phoenix_live_view` dependency.

This avoids any build step or bundler while still getting correct
LiveView WebSocket transport.

# `broadcast`

# `broadcast!`

# `broadcast_from`

# `broadcast_from!`

# `call`

# `child_spec`

Returns the child specification to start the endpoint
under a supervision tree.

# `config`

Returns the endpoint configuration for `key`

Returns `default` if the key does not exist.

# `config_change`

Reloads the configuration given the application environment changes.

# `host`

Returns the host for the given endpoint.

# `init`

# `local_broadcast`

# `local_broadcast_from`

# `path`

Generates the path information when routing to this endpoint.

# `script_name`

Generates the script name.

# `server_info`

Returns the address and port that the server is running on

# `start_link`

Starts the endpoint supervision tree.

All other options are merged into the endpoint configuration.

# `static_integrity`

Generates a base64-encoded cryptographic hash (sha512) to a static file
in `priv/static`. Meant to be used for Subresource Integrity with CDNs.

# `static_lookup`

Returns a two item tuple with the first item being the `static_path`
and the second item being the `static_integrity`.

# `static_path`

Generates a route to a static file in `priv/static`.

# `static_url`

Generates the static URL without any path information.

It uses the configuration under `:static_url` to generate
such. It falls back to `:url` if `:static_url` is not set.

# `struct_url`

Generates the endpoint base URL but as a `URI` struct.

It uses the configuration under `:url` to generate such.
Useful for manipulating the URL data and passing it to
URL helpers.

# `subscribe`

# `unsubscribe`

# `url`

Generates the endpoint base URL without any path information.

It uses the configuration under `:url` to generate such.

---

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