EU docs
$yarn add @launchdarkly/js-client-sdk
1// A "context" is a data object representing users, devices, organizations, and2// other entities. You'll need this later, but you can ignore it for now.3const context = {4 kind: 'user',5 key: 'EXAMPLE_CONTEXT_KEY'6};7// This is your client-side ID.8const client = createClient('YOUR_CLIENT_SIDE_ID', context);9client.start();1011const { status } = await client.waitForInitialization();1213if (status === 'complete') {14 console.log('SDK successfully initialized!');15} else {16 console.error('Initialization failed');17}
You can find your server-side SDK keys, mobile keys, and client-side ID on the SDK keys page under Settings.
To learn more, read Initialize the client in the JavaScript SDK reference guide.