Skip to content
Shoal
Shoal

Reference

Configuration

All client options and the shoal.yaml project file.

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),
});
OptionTypeDefaultDescription
keystring—Server or client key for one environment
baseUrlstringhttps://edge.shoal.devSelf-hosted relay or regional endpoint
streamingbooleantrueReceive updates over SSE; falls back to polling
pollIntervalnumber30000Polling period in ms when streaming is off
timeoutnumber3000Max wait for the first ruleset before fallbacks are used
bootstrapobject—Initial values (from SSR) to avoid a network round-trip
loggerLoggerconsolePass null to silence logs
onErrorfunction—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
Was this page helpful?

Type to search. Results come from a local index — nothing leaves your browser.

↑ ↓ to navigate↵ to openMiniSearch · local