Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/launchdarkly/hello-c-client
Hello LaunchDarkly for C (client-side)
https://github.com/launchdarkly/hello-c-client
c cpp examples feature-flags feature-toggles launchdarkly sdk-examples
Last synced: 3 months ago
JSON representation
Hello LaunchDarkly for C (client-side)
- Host: GitHub
- URL: https://github.com/launchdarkly/hello-c-client
- Owner: launchdarkly
- License: other
- Created: 2018-10-26T15:38:37.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-04-04T21:43:40.000Z (about 1 year ago)
- Last Synced: 2024-03-30T07:37:12.018Z (3 months ago)
- Topics: c, cpp, examples, feature-flags, feature-toggles, launchdarkly, sdk-examples
- Language: C
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 41
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Lists
- awesome-launchdarkly - C Hello LaunchDarkly
README
# LaunchDarkly Sample C Client-Side Application
We've built a simple console application that demonstrates how LaunchDarkly's SDK works.
Below, you'll find the basic build procedure, but for more comprehensive instructions, you can visit your [Quickstart page](https://app.launchdarkly.com/quickstart#/) or the [Client-Side C/C++ SDK reference guide](https://docs.launchdarkly.com/sdk/client-side/c-c--).
## Build instructions
1. Download the latest SDK for your platform with `fetch-linux.sh`, `fetch-mac.sh`, or `fetch-windows.ps1`.
2. Edit `hello.c` and set the value of `MOBILE_KEY` to your LaunchDarkly mobile key. If there is an existing boolean feature flag in your LaunchDarkly project that you want to evaluate, set `FEATURE_FLAG_KEY` to the flag key.
```c
#define MOBILE_KEY "1234567890abcdef"#define FEATURE_FLAG_KEY "my-flag"
```3. On the command line, run `build-linux.sh`, `build-mac.sh`, or `build-windows.ps1` to build for your platform.
4. Run `./hello`
You should see the message `"Feature flag '' is for this user"`.