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