bozohttpd(3lua) - NetBSD Manual Pages

Command: Section: Arch: Collection:  
BOZOHTTPD(3lua)                      LOCAL                     BOZOHTTPD(3lua)


NAME
bozohttpd -- provides access to libbozohttpd(3) functionality from Lua
SYNOPSIS
local bozo = require 'bozohttpd' instance = bozo.new() bozo.init_httpd(instance) prefs = bozo.init_prefs() bozo.set_pref(instance, prefs, name, value) bozo.get_pref(prefs, name) bozo.setup(instance, prefs, host, root) bozo.dynamic_mime(instance, one, two, three, four) bozo.ssl_set_opts(instance, one, two) bozo.cgi_setbin(instance, bin) bozo.cgi_map(instance, 1, 2) req = bozo.read_request(instance) bozo.process_request(req) bozo.clean_request(req)
DESCRIPTION
The bozohttpd Lua binding provides access to functionality available in libbozohttpd(3).
EXAMPLES
The following example code demonstrates the process of instantiating an instance of bozohttpd as a background daemon. The instance is set to serve files from /var/www for the hostname www.example.com on TCP port 8080. local bozo = require 'bozohttpd' myhttpd = bozo.new() bozo.init_httpd(myhttpd) prefs = bozo.init_prefs() bozo.set_pref(myhttpd, prefs, "port number", "8080") bozo.set_pref(myhttpd, prefs, "background", 1) bozo.setup(myhttpd, prefs, "www.example.com", "/var/www") req = bozo.read_request(myhttpd) bozo.process_request(req) bozo.clean_request(req)
SEE ALSO
lua(1), luac(1), libbozohttpd(3), intro(3lua)
HISTORY
bozohttpd Lua binding first appeared in NetBSD 9.0.
AUTHORS
The bozohttpd Lua binding was written by Alistair Crooks <agc@NetBSD.org>. This manual was written by Sevan Janiyan <sevan@NetBSD.org>.
BUGS
This manual needs more description of the available functionality. NetBSD 9.99 May 6, 2018 NetBSD 9.99
Powered by man-cgi (2020-09-24). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.