Closed VarshaKamble159 closed 5 years ago
Hi @VarshaKamble159 ,
I see that you've already closed your issue. As a result I assume that you've identified and resolved your problem.
While I'm here, I want to point you to our SDK documentation which has information about how to use the variation
method as well as other SDK features.
This particular issue is actually a support request and not a SDK bug report. Don't hesitate to reach out to support@launchdarkly.com for additional help adopting the Node Server SDK in your application.
Cheers, Ben
For the record, briefly, the two problems I see in this code are 1. you don't have a valid user object (users should have at least a key) and 2. var flagStateProps = flagsState.toJSON()['$flagsState']
does not give you the flag values, it gives you some metadata containing objects which might look like a true flag value to you because objects are always "truthy"; what you want is just var flagStateProps = flagsState.allValues()
.
Hi @eli-darkly and @bwoskow-ld ,
Thank you so much guys for your replies. Yes, i identified the issue in my code and was able to solve it. I appreciate your response.
Will surely reach out to you guys in case of any further help.
Thanks, Varsha
Hi,
I am trying to integrate node-server-sdk in my application. I am able to initialize Launch darkly with sdk-key. Also i am getting available flags using allFlagsState .
When i am trying to check flag availability using variation method, i am always getting false as response, where this flag is available in allFlags. Following is the code for the same.
Please suggest for the same.
installed npm LaunchDarkly version : "launchdarkly-node-server-sdk": "5.8.2"
NOTE: I am able to get feature flag in JAVA launchdarkly sdk with same sdk-key.