[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is there any CGI library for Lua?
- From: PA <petite.abeille@...>
- Date: Mon, 30 Oct 2006 19:01:53 +0100
On Oct 30, 2006, at 06:58, jason zhang wrote:
I want to embed the Lua into shttpd to run as a embeded web server.
Is there existing CGI library for Lua? If no, I have to write a simple
one by myself.
Just write your own like everyone else :P
#!/usr/local/bin/lua
local CGI = require( "CGI" )
local anHandler = function( aName )
print( "Hello ", aName )
end
local someMappings =
{
{ "(.*)", anHandler }
}
CGI:run( someMappings )
http://dev.alt.textdrive.com/browser/LW/CGI.lua
http://alt.textdrive.com/svn/altdev/LW/CGI.html
Cheers,
PA.