Skip to content

Run Lua-based web applications in different web server environments like Apache, Lighttpd, Nginx and others

License

Notifications You must be signed in to change notification settings

sailorproject/remy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remy

Remy (the R emulator) is a simple mod_lua emulator, allowing to run web applications built for mod_lua in alternative environments that allow to run server-side Lua code. As such, it is able to support and emulate the mod_lua API, the request_rec structure and some of its built-in functions.

This is a work in progress, an may not be suitable for production environments yet.

Remy was developed as part of Sailor, a Lua-based MVC framework which originally uses mod_lua, and is already able to run mod_lua apps in a variety of environments (listed below).

Supported Environments

Planned Environments

Usage

local remy = require "remy"

function handle(r)
    r.content_type = "text/plain"

    if r.method == 'GET' then
        r:puts("Hello Lua World!\n")
        for k, v in pairs( r:parseargs() ) do
            r:puts( string.format("%s: %s\n", k, v) )
        end
    elseif r.method == 'POST' then
        r:puts("Hello Lua World!\n")
        for k, v in pairs( r:parsebody() ) do
            r:puts( string.format("%s: %s\n", k, v) )
        end
    end
    return apache2.OK
end

remy.init()
remy.contentheader("text/plain")
remy.run(handle)

License

Remy is licensed under the MIT license (http://opensource.org/licenses/MIT)

(c) Felipe Daragon, 2014-2015

About

Run Lua-based web applications in different web server environments like Apache, Lighttpd, Nginx and others

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Lua 100.0%