From b0f8000bd8a9af340a9244f1cc0b5d4858ec6894 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 10 Aug 2026 09:04:54 +0000 Subject: [PATCH 1/2] chore: update TypeScript and @types/node dev dependency pins Co-Authored-By: jbailey@launchdarkly.com --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1c8fdf3..cff05ab 100644 --- a/package.json +++ b/package.json @@ -9,9 +9,9 @@ "author": "LaunchDarkly ", "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" From 258e4b3d8eafad3d151476e8579f88f9c765d957 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 09:03:45 +0000 Subject: [PATCH 2/2] chore: document env-var configuration in README build instructions Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a6ffe4c..c309392 100644 --- a/README.md +++ b/README.md @@ -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 feature flag evaluates to .". The application will run continuously and react to flag changes in LaunchDarkly.