mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-04 20:51:29 +00:00
Add a basic test app for the lua plugin
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
function hello(wsapi_env)
|
||||
local headers = { ["Content-type"] = "text/html", ["set-cookie"] = {"foo=bar", "bar=baz"} }
|
||||
local function hello_text()
|
||||
coroutine.yield("<html><body>")
|
||||
coroutine.yield("<p>Hello Wsapi!</p>")
|
||||
coroutine.yield("<p>PATH_INFO: " .. wsapi_env.PATH_INFO .. "</p>")
|
||||
coroutine.yield("<p>SCRIPT_NAME: " .. wsapi_env.SCRIPT_NAME .. "</p>")
|
||||
coroutine.yield("<p>QUERY_STRING: " .. wsapi_env.QUERY_STRING .. "</p>")
|
||||
coroutine.yield("</body></html>")
|
||||
end
|
||||
return 200, headers, coroutine.wrap(hello_text)
|
||||
end
|
||||
|
||||
return hello
|
||||
Reference in New Issue
Block a user