jbe@33: -- minimal example application for Moonbridge jbe@33: -- invoke with ./moonbridge helloworld.lua jbe@33: -- jbe@33: -- see example_application.lua for a more elaborated example jbe@33: jbe@33: local http = require "moonbridge_http" jbe@33: jbe@33: listen{ jbe@33: { proto = "tcp4", port = 8080, localhost = true }, jbe@33: { proto = "tcp6", port = 8080, localhost = true }, jbe@33: connect = http.generate_handler( jbe@33: function(request) jbe@33: local function error_response(status) jbe@33: request:send_status(status) jbe@33: request:send_header("Content-Type", "text/html") jbe@33: request:send_data("\n