lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wednesday 23 February 2011 10:53:49 Regular Joe wrote:
> Hello users of lua-l,
> 
> Since this is my first time on this Mailinglist, I thought I might as well
> start with an introduction
> to a project I have been working on since the past weeks.
> 
> In short, it consists of a pure Lua CGI Implementation, that also supports
> RHTML-alike templates as used by the
> CGILua project in Keplerproject.
> 
> HOWEVER CGI.Lua is not related to CGILua - But let me explain:
> 
>  + It appears that CGILua is more like a wsgi module for Lua, and not so
> much like a bareboned CGI Interface
>  + The usage of CGILua is fairly non-trivial - or so it seems (just dumping
> my personal experience here)
>  + Installation also seems a little quirky
> 
> So instead of attempting to fix a project whose API I simply couldn't quite
> peep through, I have decided to
> sit down a minute and crank together an entirely new API.
> 
> The usage is as simple as the following:
> 
>     CGI = require("CGI")
>     cgi = CGI()
>     cgi:sendHeader(200, "Content-Type", "text/html")
>     cgi:write("Hello World")
> 
> 
> Or with Templates:
> 
>     index.cgi:
> 
>         CGI = require("CGI")
>         env = {}
>         env.words = {"Hello", "World"}
>         cgi = CGI()
>         cgi:sendHeader(200, "Content-Type", "text/html")
>         cgi:include("mainpage.lsp", env)
> 
>     mainpage.lsp:
> 
>         <p>
>             <% for _, word in pairs(words) do %>
>                 <i><%= word %></i>&nbsp;
>             <% end %>
>         </p>
> 
> The template engine is in fact copied from the Kepler Project, mainly
> because it works too well to rewrite it (many thanks to the Kepler Project
> at this point!) ;-)
> 
> The website for CGI.lua is hosted at sourceforge:
> http://cgilua.sourceforge.net/index.cgi
> 
> Also, the website of CGI.lua is a fullfledged Wiki Clone I have written
> using CGI.lua (and luamars from Mars for Operating System stuff, another
> project of mine: http://github.com/nebukadnezzar/Mars).
> The wiki engine isn't opensource yet, because i'm no webdesigner, and i'd
> rather like to hear some opinions first... :-)
> 
> CGI.lua is naturally licensed under the same license as Lua, the famous
> MIT/X11 License, fair trade as it should be. :-)
> 
> I look forward to opinions and criticism!

What I'd like to see is example code showing a picklist and form to do CRUD.

Another improvement would be if your website listed commercial web hosts, of 
all prices, that have Lua installed.

Thanks

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt