Created
June 10, 2019 20:41
-
-
Save asaschachar/1ef7112747e55f7c88bf9cb9089949cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.get('/', function(req, res, next) { | |
const isEnabled = req.optimizely.client.isFeatureEnabled( | |
'hello_world', // Feature key connecting feature to UI | |
'user123', // String ID used for random percentage-based rollout | |
{ | |
customerId: 123, // Attributes used for targeted audience-based rollout | |
isVip: true, | |
} | |
); | |
res.send('Optimizely Express Example: ' + (isEnabled ? 'You got the hello world feature!' : 'Feature off.')) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment