You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-2Lines changed: 23 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,11 +28,13 @@ yarn add replane-sdk
28
28
29
29
## Quick start
30
30
31
+
> **Important:** Each API key is tied to a specific project. The client can only access configs from the project that the API key belongs to. If you need to access configs from multiple projects, create separate API keys and initialize separate clients for each project.
32
+
31
33
```ts
32
34
import { createReplaneClient } from"replane-sdk";
33
35
34
36
const client =createReplaneClient({
35
-
apiKey: process.env.REPLANE_API_KEY!,
37
+
apiKey: process.env.REPLANE_API_KEY!,// API key for a specific project
36
38
baseUrl: "https://api.my-replane-host.com",
37
39
});
38
40
@@ -81,7 +83,7 @@ Returns an object: `{ getConfigValue, watchConfigValue, close }`.
81
83
#### Options
82
84
83
85
-`baseUrl` (string) – API origin (no trailing slash needed).
84
-
-`apiKey` (string) – API key for authorization. Required.
86
+
-`apiKey` (string) – API key for authorization. Required.**Note:** Each API key is tied to a specific project and can only access configs from that project.
85
87
-`fetchFn` (function) – custom fetch (e.g. `undici.fetch` or mocked fetch in tests).
86
88
-`timeoutMs` (number) – abort the request after N ms. Default: 2000.
87
89
-`retries` (number) – number of retry attempts on failures (5xx or network errors). Default: 2.
0 commit comments