tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Dynamic content with bozohttpd



Am 11.10.13 20:35, schrieb Jochen Kunz:

>> Comments welcome.
> I really like it. It makes it easy to build some small HTTP driven
> alliances entirely with tools from base.
> 
> Take somthing like a Raspberry Pi, Beaglebone(Black), Olinuxino, ...,
> connect it to your home network, connect somthing like the room lights,
> the heating, temperature sensors, power meters, ... to the gpio(4) pins
> of the thing, hack a litle Lua script to glue httpd(8) to the lua
> binding of gpio(4) and you can control it from your desktop machine or
> smart phone via a simple web interface.

There is a Lua binding to gpio(4) in src/lib/lua/gpio.  Once we settle
the where-to-put-Lua-documentation discussion it will even be
documented.  So far most people seem to prefer a '3lua' manual section
over a '3l' section that I originally suggested.  Given the feedback, I
think it could be '3lua'.

> How to get POST data from within a Lua handler?

I did not try.  But reading CONTENT_LENGTH bytes should do it.

> What about PATH_INFO when GETing
> http://<hostname>/rest/printenv/foo/bar

That could be added.

- Marc


Home | Main Index | Thread Index | Old Index