paulbsd-salt/states/haproxy/scripts/hello_world.lua
2022-10-10 10:16:32 +02:00

12 lines
354 B
Lua

local args = table.pack(...)
core.register_service("hello-world", "http", function(applet)
local response = "Hello World !"
applet:set_status(200)
applet:add_header("content-length", string.len(response))
applet:add_header("content-type", "text/plain")
applet:start_response()
applet:send(response)
core.Info("test".."blabla")
end)