Client options
lib/shoal.ts
createClient({
key: process.env.SHOAL_KEY!, // required
baseUrl: "https://edge.shoal.dev",
streaming: true,
pollInterval: 30_000,
timeout: 3_000,
bootstrap: undefined,
logger: console,
onError: (err) => report(err),
});| Option | Type | Default | Description |
|---|---|---|---|
key | string | — | Server or client key for one environment |
baseUrl | string | https://edge.shoal.dev | Self-hosted relay or regional endpoint |
streaming | boolean | true | Receive updates over SSE; falls back to polling |
pollInterval | number | 30000 | Polling period in ms when streaming is off |
timeout | number | 3000 | Max wait for the first ruleset before fallbacks are used |
bootstrap | object | — | Initial values (from SSR) to avoid a network round-trip |
logger | Logger | console | Pass null to silence logs |
onError | function | — | Called for network and parse errors |
shoal.yaml
The project file lives in your repository root and is read by the CLI.
shoal.yaml
project: prj_8d2kq
types:
out: src/shoal.d.ts
environments:
default: development
flags:
new-checkout:
owner: "@payments"
permanent: false