five-on-it / apps/worker/src/server
apps/worker/src/server
The worker's HTTP endpoints, what the platform API calls when FOI_WORKER_URL names it:
| Route | Answer |
|---|---|
GET /health | 200 { ok, blender, running, queued }; 503 when no Blender was found. |
POST /generate {spec} | 200 { level: { name, data }, places, stats, preview? } (the preview a base64 PNG, when it could be rendered); 422 { issues: [{ path, message, severity }] } for a spec that is not valid; 500 { error } when the generation could not run; 400 for a body that is not JSON. |
One generation runs at a time: Blender takes the CPU it can, so the others wait in line, in the order they came.