-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.js
More file actions
67 lines (59 loc) · 1.56 KB
/
Copy pathconfig.js
File metadata and controls
67 lines (59 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import {BasicLogger, VariationDataType} from "@featbit/js-client-sdk";
import {UserBuilder} from "@featbit/react-client-sdk";
export const userName = 'The user 01';
const sdkKey = '3QFLBQibTE6i1duL1WAK2A227SK-9N8k-9VqurJDE_Qw';
const streamingUri = 'wss://app-eval.featbit.co';
const eventsUri = 'https://app-eval.featbit.co';
const flags = [
{
"id": "robot",
"variation": "AlphaGo",
// variation data type, string will be used if not specified
variationType: VariationDataType.string
},
{
"id": "user-info",
"variation": "v2.0.0",
// variation data type, string will be used if not specified
variationType: VariationDataType.string
},
{
"id": "JACKPOT_SC",
"variation": "true",
variationType: VariationDataType.boolean
},
{
"id": "asdf",
"variation": "true",
variationType: VariationDataType.boolean
},
];
const myLogger = new BasicLogger({
level: "debug",
destination: console.log
});
const configBase = {
options: {
sdkKey,
streamingUri,
eventsUri,
bootstrap: flags,
logLevel: 'error',
//logger: myLogger,
},
reactOptions: {
useCamelCaseFlagKeys: true
}
}
const user = new UserBuilder("fb-demo-user-key")
.name("the user name")
.custom("loggedIn", "true")
.custom("variationId", "203:b:exclusive")
.build();
export const configWithUser = {
options: {
user,
...configBase.options
},
reactOptions: configBase.reactOptions
}