https://github.com/orbit-apps/elixir-launchdarkly
Elixir wrapper around the LaunchDarkly Erlang library
https://github.com/orbit-apps/elixir-launchdarkly
library
Last synced: 3 months ago
JSON representation
Elixir wrapper around the LaunchDarkly Erlang library
- Host: GitHub
- URL: https://github.com/orbit-apps/elixir-launchdarkly
- Owner: orbit-apps
- License: apache-2.0
- Created: 2019-08-16T19:27:41.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2026-02-10T14:06:48.000Z (5 months ago)
- Last Synced: 2026-02-10T18:51:18.322Z (5 months ago)
- Topics: library
- Language: Elixir
- Size: 192 KB
- Stars: 3
- Watchers: 16
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# ExLaunchDarkly
A quick Elixir wrapper around the official LaunchDarkly [Erlang library](https://github.com/launchdarkly/erlang-server-sdk)
## Installation
```elixir
def deps do
[
{:ex_launch_darkly, github: "pixelunion/elixir-launchdarkly", tag: "v0.4.3"}
]
end
```
## Usage
Start your connection to LaunchDarkly on Application start.
```elixir
ExLaunchDarkly.App.start(Application.fetch_env!(:your_application, :launchdarkly_api_key))
```
Retrieve a variation.
```elixir
ExLaunchDarkly.variation("Some-Flag", ExLaunchDarkly.User.new("SomeUser"), false)
```
## Testing
You can configure LaunchDarkly to only use a [test data source](https://docs.launchdarkly.com/sdk/features/test-data-sources#erlang):
```elixir
ExLaunchDarkly.App.start(
"fake-key",
:default,
%{
datasource: :testdata,
send_events: false,
feature_store: :ldclient_storage_map
}
)
```