Interactive 3D Bitcoin reachable node globe built with React, Vite, and Three.js.
The browser never calls Bitnodes directly. It only reads the local static file:
public/data/bitcoin-nodes.jsonThe data script is cache-first:
npm run dataBy default it reuses the local cache for 24 hours and only calls Bitnodes when the cache is stale or missing. This prevents every build, deploy, or visitor from hitting Bitnodes.
Force a refresh manually:
npm run data:refreshCustomize the cache TTL:
BITNODES_CACHE_TTL_HOURS=12 npm run dataIf Bitnodes returns a rate limit or temporary error while a local cache exists, the script reuses the cached file instead of failing the build.
Run this once per day from your server, CI, or cron:
cd "/Users/neo/Documents/Bitcoin Node Map"
npm run data:refreshExample cron entry:
17 3 * * * cd "/Users/neo/Documents/Bitcoin Node Map" && npm run data:refresh >> ./bitnodes-refresh.log 2>&1The front end will serve the latest cached JSON after the next deploy or static file sync.
npm install
npm run data
npm run devnpm run build