Skip to content

Lux v1.1.0

Choose a tag to compare

@thecount12 thecount12 released this 13 Aug 06:18
· 83 commits to front since this release
adfc42c

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 .md files with examples/mdview.lux

Language & HTTP client

  • args() — script command-line arguments
  • exit([code]) — terminate the runtime
  • typeof(value) — runtime type / class name
  • httpPut(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 8c unused-variable warning in grouping()

Install

# Plan 9
mk install

# POSIX
make && sudo make install