HTTP server
A native, production HTTP server. Routes give a uniform response contract; collections are paginated automatically.
require serve(8080)
serve on 8080
route "GET /products"
give sql("SELECT id, name, price FROM products")
route "GET /products/:id"
give sql("SELECT * FROM products WHERE id = ?", [params.id])
Auth & validation
serve on 8080
auth with check_token
route "POST /products" requires auth
expect body {name: text, price: number}
give created(json of request)
Production web stack (Rust)
- TLS + automatic HTTPS (ACME): tls auto "email"
- Virtual hosts, reverse proxy, HTTP/2
- Static files with ETag, Range, gzip
- Rate limiting, SSE streaming, content negotiation
No Caddy/nginx needed. See Frontend for HTML pages and templates.