LaunchDarkly Sample Lua Server-Side Application
We've built a simple console application that demonstrates how LaunchDarkly's SDK works. Below, you'll find the basic build procedure, but for more comprehensive instructions, you can visit your Quickstart page. Use this as a starting point for integrating the lua-server-sdk with your application.
The SDK has two Lua dependencies
ffi. You can install
luarocks install lua-cjson. If you are using the Lua interpreter instead of LuaJIT you will need:
luarocks install --server=https://luarocks.org/dev luaffi.
Additionally you need the shared library for the LaunchDarkly
c-server-sdk. You can automatically download the
c-server-sdk shared library must be accessible be the linker at run-time.
- Install the dependencies described above
- Copy your SDK key and feature flag key from your LaunchDarkly dashboard into
LD_LIBRARY_PATH=. luajit hello.luaor
LD_LIBRARY_PATH=. lua hello.lua