logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

wsapi.fcgi - fast cgi wrapper for wsapi based dynamic pages

Author

       Enrico Tassi <gareuselesinge@debian.org>

                                                  28 April 2009                                    wsapi.fcgi(1)

Description

       If you are using Apache, you may want to add the following lines to define an hanler for .lua files:

           AddHandler fcgid-script .lua
           FCGIWrapper /usr/bin/wsapi.fcgi .lua

       A sample dynamic page follows:

           #!/usr/bin/env wsapi.fcgi

           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

Name

wsapi.fcgi - fast cgi wrapper for wsapi based dynamic pages

See Also

wsapi.cgi(1)

Synopsis

FCGIWrapper wsapi.fcgi .lua

See Also