A LaunchDarkly context object.
The types of values a feature flag can have.
Flags can have any JSON-serializable value.
Logging levels that can be used with basicLogger.
Set BasicLoggerOptions.level to one of these values to control what levels
of log messages are enabled. Going from lowest importance (and most verbose)
to most importance, the levels are 'debug'
, 'info'
, 'warn'
, and 'error'
.
You can also specify 'none'
instead to disable all logging.
Creates an object that allows you to use local files as a source of feature flag state, instead of connecting to LaunchDarkly. This would typically be used in a test environment.
Provides a simple LDLogger implementation.
This logging implementation uses a simple format that includes only the log level
and the message text. Output is written to the standard error stream (console.error
).
You can filter by log level as described in BasicLoggerOptions.level.
To use the logger created by this function, put it into LDOptions.logger. If
you do not set LDOptions.logger to anything, the SDK uses a default logger
that is equivalent to ld.basicLogger({ level: 'info' })
.
Configuration for the logger. If no options are specified, the
logger uses { level: 'info' }
.
Creates an instance of the LaunchDarkly client.
Applications should instantiate a single instance for the lifetime of the application.
The client will begin attempting to connect to LaunchDarkly as soon as it is created. To
determine when it is ready to use, call LDClient.waitForInitialization, or register an
event listener for the "ready"
event using LDClient.on.
Important: Do not try to instantiate LDClient
with its constructor (new LDClient()
); the SDK
does not currently support this.
The SDK key.
Optional configuration settings.
The new client instance.
Generated using TypeDoc
This is the API reference for the LaunchDarkly Server-Side SDK for Node.js.
In typical usage, you will call init once at startup time to obtain an instance of LDClient, which provides access to all of the SDK's functionality.
For more information, see the SDK reference guide.