@launchdarkly/node-client-sdk - v4.4.3
    Preparing search index...

    Function createClient

    • Creates an instance of the LaunchDarkly client. Note that the client will not be ready to use until LDClient.start is called.

      Usage:

      import { createClient } from '@launchdarkly/node-client-sdk';
      const client = createClient(clientSideId, context, options);

      // Attach event listeners and add any additional logic here

      // Then start the client
      client.start();

      Parameters

      • envKey: string

        The client-side ID, also known as the environment ID.

      • initialContext: LDContext

        The initial context used to identify the user.

      • options: LDOptions = {}

        Optional configuration settings.

      Returns LDClient

      The new client instance.

      The client will not automatically start until LDClient.start is called in order to synchronize the registering of event listeners and other initialization logic that should be done before the client initiates its connection to LaunchDarkly.