BOZOHTTPD(3lua)

πŸ“¦ version 11.0, in nixpkgs unstable

πŸ’– 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