lua-users home
lua-l archive

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


On Feb 7, 2011, at 6:17 PM, steve donovan wrote:

> The first is a dinky little HTTP Orbit-style app server in 500 lines
> of Lua that just needs LuaSocket [2], which is meant for embedding in
> applications which want to expose a _local_ web interface.[3]

While we are at it, here are my very own 500 lines worth of dinky HTTP server... and it doesn't even need LuaSocket :P

http://dev.alt.textdrive.com/browser/HTTP/HTTP.lua

Mandatory Hello world example:

HTTP[ '/' ] = function() return 'Hello world' end HTTP()

Online demo:

http://svr225.stepx.com:3388/search?q=lua