# `Playwriter.Server.Health`
[🔗](https://github.com/nshkrdotcom/playwriter/blob/v0.1.0/lib/playwriter/server/health.ex#L1)

Health checking for Playwright server.

# `check`

```elixir
@spec check(
  String.t(),
  keyword()
) :: :ok | {:error, term()}
```

Check if a Playwright server is responding at the given endpoint.

## Options

- `:timeout` - Connection timeout in ms (default: 5000)

## Examples

    :ok = Health.check("ws://localhost:3337/")
    {:error, :econnrefused} = Health.check("ws://localhost:9999/")

# `wait_for`

```elixir
@spec wait_for(
  String.t(),
  keyword()
) :: :ok | {:error, :timeout}
```

Wait for server to become available.

Polls the endpoint until it responds or timeout is reached.

## Options

- `:timeout` - Total timeout in ms (default: 30000)
- `:interval` - Poll interval in ms (default: 500)

## Examples

    :ok = Health.wait_for("ws://localhost:3337/")
    {:error, :timeout} = Health.wait_for("ws://localhost:9999/", timeout: 1000)

---

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