Lua on Claviron

A Lua 5.5 application loaded once per worker and woken by requests — routed by claviron.router, served under /lua.

GET /lua

The request as the application sees it. served counts this worker's requests: state stays between them.


  

GET /lua/hello/{name}

A path parameter.


  

GET /lua/count

A reply whose body is a function: each call is one piece, sent as it is made.


  

GET /lua/db/{n}

SQL with claviron.db, using Portico's separate SQLite demo pool: a series of n rows, each value typed as Lua holds it.


  

POST /lua/echo

The request body, read with request:body() and decoded by claviron.json.


  

POST /lua/words

Words and numbers in a text, found with claviron.regex — Rust's regex, which never backtracks.


  

Fleet-aware Lua chat

Chat across workers on the same host through Claviron events. Welcome and join/leave messages identify each guest's worker. /who reports participants on your worker.

Disconnected