Flags
| Flag | Default | Description |
|---|---|---|
--host <addr> | 0.0.0.0 | Listen host. |
--port <n> | 8080 | Listen port. |
--workers <n> | CPU cores | Worker pool size. |
--gotenberg <url> | — | Gotenberg URL for HTML→PDF rendering. |
--tika <url> | — | Apache Tika URL for content extraction. |
--llm <url> | — | OpenAI-compatible LLM endpoint. |
SCREENJSON_GOTENBERG_URL, SCREENJSON_TIKA_URL, SCREENJSON_LLM_URL).
Endpoints
| Method | Path | Purpose |
|---|---|---|
GET | / | Queue status and metrics. |
GET | /health | Health check, including per-service status. |
GET | /formats | List supported formats. |
POST | /convert | Upload a file, receive ScreenJSON. |
POST | /export | Upload ScreenJSON, receive a format. |
POST | /validate | Validate a ScreenJSON document. |
Request limits
/convert,/export: 50 MB request body./validate: 10 MB request body.
CORS
The server emits a permissive CORS policy:Access-Control-Allow-Origin: *Access-Control-Allow-Methods: GET, POST, OPTIONSAccess-Control-Allow-Headers: Content-Type, Authorization
OPTIONS preflight returns 200 with the headers above.
Examples
Graceful shutdown
The server catchesSIGINT and SIGTERM and drains in-flight requests with a 30-second timeout before exiting.