REST (any backend)
The bootstrap contract is just an HTTP response shape — nothing about it requires Node. This page covers wiring it up from Python, Go, and Ruby, plus the two things a genuinely cross-origin backend needs to get right: CORS and the Date header.
- Any backend that can serve JSON over HTTP — examples here use Flask/FastAPI, Go, and Rails
- For Node-specific patterns (including Next.js's assets[] chunk warming), see bootstrap/node instead
- Familiarity with api/bootstrap on the client side
The contract, independent of language
Python — Flask and FastAPI
asyncio.gather — the same one-network-call-multiple-queries pattern from the Postgres and MongoDB guides applies here too.Go and Ruby on Rails
ok, data, assets — stay fixed.assets[] is always empty here
Don't strip the Date header
flux.bootstrap() reads this header to compute clockSkewMs, which feeds directly into handshake conflict detection — not just a display value.CORS — the thing this page needs that the others don't
flux.bootstrap() silently never resolves.Per Section 4.13's failure handling, a blocked CORS request falls into the same "serve existing IDB data, never roll back" path as a genuine network error — there's no console signal from Flux itself distinguishing the two. Check the browser's Network tab directly if bootstrap seems to silently do nothing.
Extending to a 'user'-scope endpoint
Status codes and how the client reacts
For Node-specific patterns, see bootstrap/node. For Postgres or MongoDB query patterns specifically, see bootstrap/postgres or bootstrap/mongodb. For the client-side call this endpoint answers, see api/bootstrap.