Cordon needs to be running before your application starts making API calls. There are two approaches, both project-scoped: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.
- Procfile (recommended for development) — start Cordon alongside your app in a process manager. Simple, no system-level installation, stops when you stop developing.
- Background service (optional) — install Cordon as a launchd/systemd service for a project. Starts on login, restarts on failure. Useful when you want the proxy always available for a specific project without manually starting it.
Procfile (foreman / overmind)
The simplest approach for development. Usecordon wait to block until the proxy is ready:
cordon wait polls the health endpoint until it returns 200, then exits. Your application starts only after credentials are loaded and the proxy is accepting connections.
Background service
Install cordon as an OS-managed service that starts automatically:- macOS (launchd)
- Linux (systemd)
The service is installed as a launchd user agent. It starts on login and restarts on failure.
Named instances
Run multiple cordon instances with different configs:Health endpoint
The health endpoint is available atGET /health once the proxy binds its listener:
| Status | Response | Meaning |
|---|---|---|
200 | {"status":"ok"} | Proxy is ready — secrets loaded, accepting connections |
| (connection refused) | (no response) | Proxy has not finished starting |
503 state. Before the listener binds, there is no open port (connection refused). Once TcpListener::bind() succeeds, /health immediately returns 200. Process supervisors can distinguish between “not started yet” (connection refused) and “ready” (200).
Startup sequence
The proxy starts in a strict order:- Parse and validate
cordon.toml. Exit on invalid config. - Resolve all secrets from configured sources. Exit if any fail.
- If TLS enabled: generate or load CA keypair.
- Bind listener on configured address. The health endpoint serves
200from this point. - Begin accepting connections.