Repository navigation
Lux v1.1.0
Lux v1.1.0
Templates, Markdown, and a much more capable HTTP server — plus runtime helpers (args, exit, typeof) and memory fixes since v1.0.3.
HTTP server
- Prefork workers:
server.workers(n)(default 4;1= single process) - Middleware:
server.use(fn)with(req, res, next) - Virtual hosts:
vhost,getHost/postHost,req.host - Static files and request logging
- Examples:
examples/server_middleware.lux,examples/vhost_server.lux,examples/template_server/
Templates & Markdown
renderTemplate—{{ key }},{% for %},{% include %},{% include_md %}markdownToHtml/renderMarkdown- Preview a folder of
.mdfiles withexamples/mdview.lux
Language & HTTP client
args()— script command-line argumentsexit([code])— terminate the runtimetypeof(value)— runtime type / class namehttpPut(url, body)— HTTP PUT- GraphQL example via
httpRequest:examples/graphql.lux
Fixes
- Array and heap memory issues (including AMD)
- Dict cleanup
- luxcheck / luxlint updates
- Plan 9
8cunused-variable warning ingrouping()
Install
# Plan 9
mk install
# POSIX
make && sudo make install