Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ For a sample application demonstrating how to use LaunchDarkly in *client-side*
## Build instructions

1. Install the LaunchDarkly Node.js SDK by running `npm install`
2. Edit `index.ts` and set the value of `sdkKey` to your LaunchDarkly SDK key. If there is an existing boolean feature flag in your LaunchDarkly project that you want to evaluate, set `featureFlagKey` to the flag key.
2. Set the environment variable `LAUNCHDARKLY_SDK_KEY` to your LaunchDarkly SDK key. If there is an existing boolean feature flag in your LaunchDarkly project that you want to evaluate, set `LAUNCHDARKLY_FLAG_KEY` to the flag key; otherwise, a boolean flag of `sample-feature` will be assumed.

```js
const sdkKey = "1234567890abcdef";

const featureFlagKey = "my-flag";
```bash
export LAUNCHDARKLY_SDK_KEY="1234567890abcdef"
export LAUNCHDARKLY_FLAG_KEY="my-boolean-flag"
```

3. Run `npm start`

You should receive the message "The <flagKey> feature flag evaluates to <flagValue>.". The application will run continuously and react to flag changes in LaunchDarkly.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"author": "LaunchDarkly <team@launchdarkly.com>",
"license": "Apache-2.0",
"devDependencies": {
"@types/node": "22.10.1",
"@types/node": "22.20.1",
"ts-node": "10.9.2",
"typescript": "5.7.2"
"typescript": "5.9.3"
},
"dependencies": {
"@launchdarkly/node-server-sdk": ">= 9.0.0"
Expand Down
Loading