[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: xavante and mercury
- From: Petite Abeille <petite.abeille@...>
- Date: Sat, 3 Oct 2009 19:09:02 +0200
On Oct 3, 2009, at 1:20 PM, Ashish Shrestha wrote:
Just wanted to share something I recently found -- Mercury, a Sinatra
like framework for Lua [http://github.com/nrk/mercury]
I am using it with Xavante (without everything else from Kepler) and
using the script from Fabio Mascarenhas
[http://lua-users.org/lists/lua-l/2009-09/msg00780.html] to launch the
web application.
Here is an example on how to run Mercury with Nanoki's HTTP engine
[1], using it's build in TCPServer [2] and a WSAPI handler [3]:
local HTTP = require( 'HTTP' )
local TCPServer = require( 'TCPServer' )
local WSAPI = require( 'WSAPI' )
HTTP[ '.*' ] = WSAPI( require( 'greetings' ).run )
TCPServer( '127.0.0.1', 1080 )( HTTP )
While this "work", none of this necessarily make any sense :)
[1] http://dev.alt.textdrive.com/browser/HTTP/HTTP.lua
[2] http://dev.alt.textdrive.com/browser/HTTP/TCPServer.lua
[3] http://dev.alt.textdrive.com/browser/HTTP/WSAPI.lua