We've built a console application that demonstrates how to use LaunchDarkly's Java SDK in a Clojure application. There isn't a separate Clojure SDK.
Below, you'll find the basic build procedure. For more comprehensive instructions, you can visit your Quickstart page or the Java SDK reference guide.
This project uses the Leiningen build tool. It requires that Java is already installed on your system (version 8 or higher). It will automatically use the latest version of the LaunchDarkly Java SDK with major version 5.
- Edit
src/hello.clj
and set the value ofsdk-key
to your LaunchDarkly SDK key. If there is an existing boolean feature flag in your LaunchDarkly project that you want to evaluate, setflag-key
to the flag key.
(def sdk-key "1234567890abcdef")
(def flag-key "my-feature-flag-key")
- On the command line, run
lein run
.
You should receive the message "Feature flag '<flag key>' is <true/false> for this user"
.