Skip to content

Commit

Permalink
Adding localhost mode
Browse files Browse the repository at this point in the history
  • Loading branch information
sarrubia committed May 18, 2022
1 parent d638e1c commit 74a6520
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,22 @@ try {
const splits = core.getMultilineInput('splits');
core.debug('Splits: ' + splits);

var factory = SplitFactory({
core: {
authorizationKey: apiKey,
},
});
var factory;
if (apiKey == 'localhost') {
factory = SplitFactory({
core: {
authorizationKey: apiKey,
},
features: '.github/splitio/.split',
});
} else {
factory = SplitFactory({
core: {
authorizationKey: apiKey,
},
});
}

var client = factory.client();

client.on(client.Event.SDK_READY, async function () {
Expand Down

0 comments on commit 74a6520

Please sign in to comment.