1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
.\"Text automatically generated by txt2man
.TH wsapi.cgi 1 "28 April 2009" "" "wsapi documentation"
.SH NAME
\fBwsapi.cgi \fP- cgi wrapper for wsapi based dynamic pages
\fB
.SH SYNOPSIS
.nf
.fam C
#!/usr/bin/env wsapi.cgi
.fam T
.fi
.fam T
.fi
.SH DESCRIPTION
A sample dynamic page follows:
.PP
.nf
.fam C
#!/usr/bin/env wsapi.cgi
module(\.\.\., package.seeall)
function run(wsapi_env)
local headers = { ["Content-type"] = "text/html" }
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("</body></html>")
end
return 200, headers, coroutine.wrap(hello_text)
end
.fam T
.fi
.SH SEE ALSO
\fBwsapi.fcgi\fP(1)
.SH AUTHOR
Enrico Tassi <gareuselesinge@debian.org>
|