Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/launchdarkly/hello-js
Hello LaunchDarkly for Client-side JavaScript
https://github.com/launchdarkly/hello-js
examples feature-flags feature-toggles javascript launchdarkly sdk-examples
Last synced: 3 months ago
JSON representation
Hello LaunchDarkly for Client-side JavaScript
- Host: GitHub
- URL: https://github.com/launchdarkly/hello-js
- Owner: launchdarkly
- License: other
- Created: 2015-10-07T01:34:36.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-03-27T23:18:04.000Z (3 months ago)
- Last Synced: 2024-03-28T00:26:12.142Z (3 months ago)
- Topics: examples, feature-flags, feature-toggles, javascript, launchdarkly, sdk-examples
- Language: HTML
- Homepage:
- Size: 259 KB
- Stars: 7
- Watchers: 45
- Forks: 17
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Lists
- awesome-launchdarkly - Client-side JavaScript Hello LaunchDarkly
README
### LaunchDarkly Sample JavaScript 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 [JavaScript SDK reference guide](https://docs.launchdarkly.com/sdk/client-side/javascript).#### Build instructions
1. Edit `index.html` and set the value of `clientSideID` to your LaunchDarkly client-side ID. If there is an existing boolean feature flag in your LaunchDarkly project that you want to evaluate, set `flagKey` to the flag key.
```
const clientSideID = 'myClientSideID';
const flagKey = 'my-flag-key';
```2. Open `index.html` in your browser.
You should receive the message "Feature flag key '' is for this user".