hook.io
hook.io copied to clipboard
Better lua support
We've been getting a few requests for better lua support.
So far we have:
- added
socket,json,cryptoandsslpackages.
We should:
- install more common and useful packages via
luarocks - allow ability for users to automatically install rocks with
luarocks - add more lua examples
- add lua table support for
Hook.envandHook.paramshttps://github.com/Stackvana/microcule/issues/18
@teamflower -
Do you have any additional suggestions for improving Lua support? This is a good place to bring them up.
Thanks, @Marak. Some guidance or improvements on using logging with Lua would be helpful: https://hook.io/logs
Just a couple example lines for Lua on the page would be 🎉 Not sure where to start.
@teamflower -
So it's technically possible to do this right now using something like:
io.stderr:write('{ "type": "log", "payload": { "entry": "hello logs"}}')
That should send "hello logs" to the service logs. In addition to the above listed items, I'm going to write a convenience method for the lua services called log that will automatically wrap the above statement into a single function.
Thanks for the suggestion!