BOZOHTTPD(3lua)
π NAME π
okay bestie, welcome to BOZOHTTPD(3lua) β the page that lives in the LOCAL manual. The star is bozohttpd β it provides access to libbozohttpd(3) functionality from Lua. That's the whole cutie premise. π¦
β¨ SYNOPSIS β¨
Use this exact code, no freestyling:
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 hands you the functionality available in libbozohttpd(3). Simple as that, no cap. π
π EXAMPLES π
This 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. Iconic behavior, fr fr:
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 π₯
go peek at lua(1), luac(1), libbozohttpd(3), and intro(3lua) β all the adjacent lore. π
π HISTORY π
The bozohttpd Lua binding first appeared in NetBSD 9.0. history was made. β¨
π AUTHORS π
The bozohttpd Lua binding was written by Alistair Crooks <agc@NetBSD.org>. give them their flowers π
π BUGS π
ngl, this manual needs more description of the available functionality. That's the bug note, bestie. π
cute sign-off: this page is source/version Debian, dated May 6, 2018, and it's the BOZOHTTPD(3lua) page. bye bestie, go slay your HTTP daemon setup π
π«Ά
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2018 The NetBSD Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms