Skip to main content
Starts a long-running HTTP server exposing the conversion, export, and validation engine.

Flags

External URLs also come from environment variables (SCREENJSON_GOTENBERG_URL, SCREENJSON_TIKA_URL, SCREENJSON_LLM_URL).

Endpoints

Full request/response details: API Reference → screenjson-cli endpoints.

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, OPTIONS
  • Access-Control-Allow-Headers: Content-Type, Authorization
OPTIONS preflight returns 200 with the headers above.

Examples

Graceful shutdown

The server catches SIGINT and SIGTERM and drains in-flight requests with a 30-second timeout before exiting.