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

launchdarkly/hello-nginx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Important

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

LaunchDarkly Lua server-side SDK NGINX example

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

Build instructions

  1. On the command line, build the image from this directory with docker build -t launchdarkly-nginx ..
  2. Run the demo with docker run --rm -p 8123:80 -e LD_SDK_KEY="" -e LD_FLAG_KEY="" launchdarkly-nginx. 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:80 -e LD_SDK_KEY="1234567890abcdef" -e LD_FLAG_KEY="my-boolean-flag" launchdarkly-nginx
  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”.