Wisp

Type to search every docs page and heading.

Environment Variables

Read once at start. Switches take on/off (also 1/0, true/false). Your own: wisp::env("KEY"), wisp::env_or("KEY", 4), or #[derive(Config)].

Server

NameWhat it does
HOST, PORTlisten address (0.0.0.0:3000 in release, 127.0.0.1 in dev)
WISP_DEVdev mode: on in debug builds (5xx details, static/ from disk, dev log)
WISP_THREADSworker threads, one per CPU
WISP_IOLinux: epoll instead of io_uring; uring fails at start where it does not work
WISP_MAX_CONNSopen connections before new ones get a 503 (10000; 0 no cap)
WISP_BODY_LIMITlargest request body in bytes (1 MB); const BODY_LIMIT per route
WISP_HANDLER_TIMEOUThandler timeout in seconds
WISP_WS_IDLEseconds a quiet WebSocket lives (60; 0 never)
WISP_CLIENT_IP_HEADERheader with the client address behind a proxy
WISP_SECURE_HEADERSoff leaves out nosniff and referrer-policy
WISP_HSTSon adds strict-transport-security
WISP_PROBLEM_JSONon: errors as RFC 9457 problem JSON
WISP_REQUEST_IDon: every request gets an id (cx.request_id()), echoed as x-request-id
WISP_API_DOCSserve /_wisp/openapi.json and /_wisp/docs (on in dev)
WISP_SECRET, WISP_SECRET_OLDkey for signed cookies and tokens, and the one before (rotation)
WISP_DATAfolder for table files
WISP_FSYNCsecond (default), always, off
WISP_STOREa store for tables: d1:DB, deno-kv, libsql://…
WISP_STORE_TOKENbearer token for a libsql:// store
WISP_STORE_POLLseconds between store change polls (several servers)
WISP_BASEbase path, set at build (/app)
SITE_URLsite address for sitemaps, feeds and absolute links
SITE_TITLEfeed title
METRICS_KEYbearer key for /_wisp/metrics
CRON_SECRETbearer key hosts send to /_wisp/cron/<schedule>
WISP_NODE_HTTP1: Node, Bun and Deno targets serve with the runtime's own HTTP server
AWS_LAMBDA_RUNTIME_APIset by Lambda: the binary answers its runtime API
WISP_EDITOR, EDITORwhat the dev error dialog's Open runs (code -g)

#[derive(Rest)] bearer tokens and OAuth client ids and secrets are read from the names their attributes give.

Logs and Traces

NameWhat it does
WISP_LOGjson: a JSON line per request
OTEL_EXPORTER_OTLP_ENDPOINTOTLP/HTTP traces to <endpoint>/v1/traces
OTEL_EXPORTER_OTLP_TRACES_ENDPOINTthe traces URL, as is
OTEL_EXPORTER_OTLP_HEADERSapi-key=…,x=…
OTEL_EXPORTER_OTLP_TRACES_HEADERSthe same, for traces only (wins)
OTEL_SERVICE_NAMEservice name on spans
OTEL_BSP_SCHEDULE_DELAYbatch delay in ms (5000)

CLI and Tests

NameWhat it does
WISP_NO_UPDATE_CHECK1 silences the CLI-older-than-app warning
WISP_PORT_TRIEShow many next ports wisp dev tries when one is taken (20)
WISP_CWEBPthe cwebp wisp build uses for images
WISP_SASSthe Dart Sass for src/app.scss
WISP_TSCthe tsc for wisp check --types
WISP_BROWSERChrome or Edge for browser tests
NO_COLORplain CLI output

Is This Page Useful?

Edit This Page