The upload-server is a small, optional Express server that turns an uploaded query plan into a shareable URL.
It exists so a team can host their own endpoint for sharing plans; the public app at tableau.github.io/query-graphs works without it, storing plans locally in the browser instead (see standalone-app).
The whole server is a single file, upload-server.js.
The server plays two roles, wiring itself to the deployed app:
- Entry redirect — a
GET /redirects to the app'sindex.htmlwith a?uploadServer=<this-server>/uploadsparameter. From then on, the app knows to upload opened plans here (see the sharing flow instandalone-app). - Upload endpoint — a
PUT /uploadsaccepts the raw plan body (up to 2 MB), writes it to a file with a random name, and responds with that file's public URL.GET /uploads/<file>then serves it back, with CORS enabled so the app can fetch it from another origin.
The returned URL is what makes a plan shareable: anyone who opens it loads the same plan.
Uploaded plans are stored as files under uploads/.
The server keeps only the most recent KEEP_FILES (currently 50) and deletes older ones on each upload, so it is a rolling cache, not permanent storage.
Uploading a plan sends it to whoever operates the server — unlike the app's default local-storage sharing, which never leaves the browser. Only run plans through an upload server you trust.
cd upload-server
pnpm install
node upload-server.jsThe server listens on port 3000.
Set DEBUG=upload-server:* to see per-request logging (it uses the debug module).
The app it redirects to is configured by the GUI_URL constant at the top of upload-server.js.