Skip to content

Initial Feature Flag Fetch Returns Default Value Instead of Rollout Value #203

Closed Answered by rvowles
barath121 asked this question in Q&A
Discussion options

You must be logged in to vote

Heya - your node code isn't right unfortunately. You cannot have a single context for the entire application, you need to have a context per request, you are mixing browser style coding (where there is a single context) with node style (which is where there is one per request).

For node you need to be making sure you are using a client evaluated key, and in your middleware, you need to ask for a new context - so app.use(() => req.featureContext = fhClient.newContext().attributeValue......build());

If you don't do that, you are changing the global config and it will replace the repository and go back to being blank.

Replies: 8 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@barath121
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@barath121
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by barath121
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants