lua-users home
lua-l archive

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

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 []

I am using it with Xavante (without everything else from Kepler) and
using the script from Fabio Mascarenhas
[] 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( '', 1080 )( HTTP )

While this "work", none of this necessarily make any sense :)