Recipes

Short, copy-paste examples for common tasks. Each recipe links to deeper guides and the API reference.

Hello World

Minimal server in a few lines.

Typed REST API

pathScan routes and JSON responses.

Multipart file upload

Forms with enctype and request.files.

Static files & SPA fallback

browseHome plus client-route fallback.

HTTPS and redirect

PKCS cert binding and HTTP→HTTPS.

REST + WebSockets

One app, one port.

WebSocket broadcast

Fan-out to all clients.

Nested / company routes

pathScan without swallowing paths.

Sessions

Cookie state store.

Basic authentication

authenticateBasic middleware.

Rate limiting

Protect an endpoint in one line.

DotLiquid page

Render an HTML template.

JSON with Suave.Json

mapJson helpers.

Docker & nginx

Reverse-proxy deployment.