> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codezero.io/llms.txt
> Use this file to discover all available pages before exploring further.

# cordon wait

> Wait for the proxy to be ready before starting your application.

Polls the health endpoint until the proxy reports ready. Useful in Procfiles, scripts, and CI pipelines to ensure the proxy is accepting connections before starting dependent applications.

## Usage

```bash theme={null}
cordon wait [OPTIONS]
```

## Options

| Option           | Default                                                  | Description                                                                                     |
| ---------------- | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `--url`          | derived from config, else `http://127.0.0.1:6790/health` | Health check URL. Overrides and conflicts with `--config` and `--scope`.                        |
| `--config`, `-c` | —                                                        | Read `listen` from this config file. Mutually exclusive with `--url` and `--scope`.             |
| `--scope`        | project                                                  | Read `listen` from the selected scope's config. Mutually exclusive with `--url` and `--config`. |
| `--timeout`      | `30`                                                     | Timeout in seconds                                                                              |

Without `--url`, `cordon wait` uses the selected config's `listen` port. With no flags, it tries project scope first and falls back to `http://127.0.0.1:6790/health` if no project config exists.

## Examples

```bash theme={null}
# Wait with defaults
cordon wait

# Wait with custom timeout
cordon wait --timeout 60

# Wait on the user-scope proxy
cordon wait --scope user

# Wait on an explicit health URL
cordon wait --url http://127.0.0.1:7000/health

# Use in a Procfile
# web: cordon wait && npm run dev
```

## Exit codes

| Code | Meaning                                      |
| ---- | -------------------------------------------- |
| `0`  | Proxy is ready                               |
| `1`  | Timeout reached — proxy did not become ready |
