@@ -23,15 +23,13 @@ npm install @splitsoftware/splitio
2323npm install @openfeature/server-sdk
2424```
2525
26- ### Register the Split provider with OpenFeature using splitClient
26+ ### Register the Split provider with OpenFeature using sdk apiKey
2727``` js
2828const OpenFeature = require (' @openfeature/server-sdk' ).OpenFeature ;
29- const SplitFactory = require (' @splitsoftware/splitio' ).SplitFactory ;
3029const OpenFeatureSplitProvider = require (' @splitsoftware/openfeature-js-split-provider' ).OpenFeatureSplitProvider ;
3130
3231const authorizationKey = ' your auth key'
33- const splitClient = SplitFactory ({core: {authorizationKey}}).client ();
34- const provider = new OpenFeatureSplitProvider ({splitClient});
32+ const provider = new OpenFeatureSplitProvider (authorizationKey);
3533OpenFeature .setProvider (provider);
3634```
3735
@@ -47,6 +45,18 @@ const provider = new OpenFeatureSplitProvider(splitFactory);
4745OpenFeature .setProvider (provider);
4846```
4947
48+ ### Register the Split provider with OpenFeature using splitClient
49+ ``` js
50+ const OpenFeature = require (' @openfeature/server-sdk' ).OpenFeature ;
51+ const SplitFactory = require (' @splitsoftware/splitio' ).SplitFactory ;
52+ const OpenFeatureSplitProvider = require (' @splitsoftware/openfeature-js-split-provider' ).OpenFeatureSplitProvider ;
53+
54+ const authorizationKey = ' your auth key'
55+ const splitClient = SplitFactory ({core: {authorizationKey}}).client ();
56+ const provider = new OpenFeatureSplitProvider ({splitClient});
57+ OpenFeature .setProvider (provider);
58+ ```
59+
5060## Use of OpenFeature with Split
5161After the initial setup you can use OpenFeature according to their [ documentation] ( https://docs.openfeature.dev/docs/reference/concepts/evaluation-api/ ) .
5262
0 commit comments