> ## Documentation Index
> Fetch the complete documentation index at: https://launchdarkly.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up Node.js (client-side) SDK

<View title="Developer" />

<View title="Federal docs" />

<View title="EU docs" />

<View title="Federal docs">
  <Danger>
    **LaunchDarkly onboarding is not available in federal environments**

    To learn more, read <a href="/docs/home/infrastructure/federal">LaunchDarkly in federal environments</a>.
  </Danger>
</View>

Install and initialize the LaunchDarkly Node.js (client-side) SDK to start evaluating feature flags in your application.

## Install the package

<CodeGroup>
  ```shell title="yarn" lines wrap theme={null}
  yarn add launchdarkly-node-client-sdk
  ```

  ```shell title="npm" lines wrap theme={null}
  npm i launchdarkly-node-client-sdk
  ```

  ```shell title="pnpm" lines wrap theme={null}
  pnpm i launchdarkly-node-client-sdk
  ```
</CodeGroup>

### Initialize the SDK

```tsx title="Node.js (client-side) SDK initialization" expandable lines wrap theme={null}
import * as LaunchDarkly from 'launchdarkly-node-client-sdk';

// A "context" is a data object representing users, devices, organizations, and other entities.
const context = {
  kind: 'user',
  key: 'EXAMPLE_CONTEXT_KEY',
};

// This is your client-side ID.
const client = LaunchDarkly.initialize('YOUR_CLIENT_SIDE_ID', context);

try {
  await client.waitForInitialization(5);
  // Initialization succeeded
} catch (err) {
  // Initialization failed or did not complete before timeout
}
```

<Accordion title="Finding your SDK credentials">
  You can find your server-side SDK keys, mobile keys, and client-side ID on the **SDK keys** page under **Settings**.
</Accordion>

To learn more, read [Initialize the client](/docs/sdk/client-side/node-js#initialize-the-client) in the Node.js (client-side) SDK reference guide.
