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
Flagd is a simple command line tool for fetching and presenting feature flags to services. It is designed to conform to OpenFeature schema for flag definitions. This repository and package provides the client side code for interacting with it via the Open-Feature Node SDK.
Run `nx package providers-flagd` to build the library.
16
16
17
+
> NOTE: [Buf](https://docs.buf.build/installation) must be installed to build locally.
18
+
17
19
## Running unit tests
18
20
19
21
Run `nx test providers-flagd` to execute the unit tests via [Jest](https://jestjs.io).
20
22
23
+
## Usage
21
24
22
-
## Usage
25
+
The `FlagdProvider` client constructor takes a single optional argument with 3 fields, their default values correspond to the default arguments supplied to the flagd server:
23
26
24
-
The `FlagdProvider` client constructor takes a single optional argument with 3 fields, their default values correspond to the default arguments supplied to the flagd server:
25
27
```
26
28
OpenFeature.setProvider(new FlagdProvider({
27
-
service: 'grpc',
29
+
service: 'grpc',
28
30
host: 'localhost',
29
31
port: 8080,
30
32
}))
31
33
```
32
-
**service**: "http" | "grpc" *(defaults to http)*
33
-
**host**: string *(defaults to "localhost")*
34
-
**port**: number *(defaults to 8080)*
35
-
**protocol**: "http" | "https" *(defaults to http - only active for http service)*
34
+
35
+
**service**: "http" | "grpc" _(defaults to http)_
36
+
**host**: string _(defaults to "localhost")_
37
+
**port**: number _(defaults to 8080)_
38
+
**protocol**: "http" | "https" _(defaults to http - only active for http service)_
0 commit comments