> For the complete documentation index, see [llms.txt](https://docs.winga.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.winga.me/getting-started/faq.md).

# FAQ

### What happens if Winga is unreachable?

Your app keeps running. The SDK never throws from a flag read — `isEnabled` returns `false` and `getValue` returns the default you passed when a flag can't be resolved (including when the initial load fails or the network is down). Failures are reported through the optional `onError` callback so you can log or alert on them, but they never interrupt your code path. `ready()` follows the same rule: it resolves rather than rejects, even on a failed load.

```ts
const ff = Winga({
  apiKey: process.env.WINGA_API_KEY!,
  environment: 'production',
  onError: (err) => console.error('winga', err.code),
})

// Returns the default (10) if Winga can't be reached — no throw.
const limit = ff.getValue<number>('upload-limit', 10)
```

***

### Can I use Winga without a JavaScript SDK?

Yes. The SDK is a thin client over a public evaluation API. You can read flags over plain HTTP with `GET /v1/flags?env=<environment>`, authenticating with the `X-Winga-Key` header, and subscribe to realtime updates over Server-Sent Events at `GET /v1/stream?env=<environment>`. This is how non-JavaScript stacks integrate. See the [evaluation API reference](/api-reference/evaluation-api.md) for the full endpoint list and wire format.

***

### Is my API key secret?

Treat your `proj_live_` key as a secret and keep it server-side. Store it in an environment variable rather than hardcoding it, and never commit it to source control. Keys are shown only once when you create them, so copy and store the value at that moment. You can create, name, and revoke keys at any time from **Project Settings → API Keys**.

***

### What does a `proj_live_` key look like?

Every project API key is issued with the `proj_live_` prefix followed by a long random string, and it reads the live flag state from your dashboard. You can mint multiple keys per project — for example, one per service — and give each a name so you can rotate or revoke them independently from **Project Settings → API Keys**. The key you use, combined with the `environment` you pass to the SDK, determines which environment's flag values you read.

***

### How do I read a different environment?

Point the SDK at it with the `environment` option — `development`, `staging`, or `production`, matching the environments on your project. One client reads one environment; create a separate client if you need to read more than one at a time.
