Skip to content

Commit 2486145

Browse files
committed
update readme examples
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
1 parent 9d50f01 commit 2486145

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,27 @@ This Provider is designed to allow the use of OpenFeature with Split, the platfo
1010
## Getting started
1111
Below is a simple example that describes the instantiation of the Split Provider. Please see the [OpenFeature Documentation](https://docs.openfeature.dev/docs/reference/concepts/evaluation-api) for details on how to use the OpenFeature SDK.
1212

13+
### Add the Split provider
14+
15+
```sh
16+
npm install @splitsoftware/openfeature-js-split-provider
17+
```
18+
19+
### Confirm peer dependencies are installed
20+
```sh
21+
npm install @splitsoftware/splitio
22+
npm install @openfeature/js-sdk
23+
```
24+
25+
### Register the Split provider with OpenFeature
1326
```js
1427
const OpenFeature = require('@openfeature/js-sdk').OpenFeature;
1528
const SplitFactory = require('@splitsoftware/splitio').SplitFactory;
1629
const OpenFeatureSplitProvider = require('@splitsoftware/openfeature-js-split-provider').OpenFeatureSplitProvider;
1730

18-
splitClient = SplitFactory({core: {authorizationKey: 'localhost'}}).client();
19-
provider = new OpenFeatureSplitProvider({splitClient});
31+
const authorizationKey = 'your auth key'
32+
const splitClient = SplitFactory({core: {authorizationKey}}).client();
33+
const provider = new OpenFeatureSplitProvider({splitClient});
2034
openFeature.setProvider(provider);
2135
```
2236

0 commit comments

Comments
 (0)