Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

launchdarkly/hello-haproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Important

Please see Lua Server SDK for the most up-to-date hello-haproxy. This repo is deprecated.

LaunchDarkly Lua server-side SDK HAProxy example

We've built a minimal dockerized example of using the Lua SDK with HAProxy. For more comprehensive instructions, you can visit the Using the Lua SDK with HAProxy guide or the Lua reference guide.

Build instructions

  1. On the command line, build the image from this directory with docker build -t launchdarkly-haproxy ..
  2. Run the demo with docker run --rm -p 8123:8123 -e LD_SDK_KEY="" -e LD_FLAG_KEY="" launchdarkly-haproxy. Set the environment variables LD_SDK_KEY to your LaunchDarkly SDK key, and, if there is an existing boolean feature flag in your LaunchDarkly project that you want to evaluate, set LD_FLAG_KEY to the flag key.
docker run --rm -p 8123:8123 -e LD_SDK_KEY="1234567890abcdef" -e LD_FLAG_KEY="my-boolean-flag" launchdarkly-haproxy
  1. Open localhost:8123 in your browser. Toggle the flag on to see a change in the page.

You should receive the message ”Feature flag is <true/false> for this user”.