Tyk uses LuaJIT. The main requirement is the LuaJIT shared library, you may find this as
libluajit-x in most distros.
For Ubuntu 14.04 you may use:
$ apt-get install libluajit-5.1-2 $ apt-get install luarocks
The LuaJIT required modules are as follows:
- lua-cjson: in case you have
$ luarocks install lua-cjson
How to write LuaJIT Plugins
We have a demo plugin hosted here. The project implements a simple middleware for header injection, using a Pre hook (see Tyk custom middleware hooks) and mymiddleware.lua.
Lua support is currently in beta stage. We are planning performance optimisations for future releases.
Tyk Lua API Methods
Tyk Lua API methods aren’t currently supported.