Quick start
Use Node.js 22.14+ (22 or 24). The standalone diagnostic API does not require ArcGIS.
- Install with
npm ci. - Validate with
npm run build. - Start with
npm start. - Open
http://127.0.0.1:3000/readyandhttp://127.0.0.1:3000/api/sources/default/features. - Stop with Ctrl+C.
The default source is data/sample.csv. First use downloads the official DuckDB spatial extension; later runs reuse the cache. Offline production images preinstall extensions and disable installation.
On Windows PowerShell, if the npm script shim fails to find npm-cli.js, use npm.cmd in place of npm (for example npm.cmd run build). This is a local tool installation issue.
Change the source
node scripts/cdf-cli.js init -o config/local.json
node scripts/cdf-cli.js validate-config -f config/local.json
node scripts/cdf-cli.js preflight -f config/local.json -d default
Edit the new file before testing another source. Init refuses to overwrite files. Set $env:CDF_CONFIG = "config/local.json" in PowerShell or export CDF_CONFIG=config/local.json in a POSIX shell, then start again.
Authenticate
Generate a random token:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
Store it in CDF_API_TOKEN via your shell/secret manager. Production/non-loopback mode requires it. Source and metrics routes then require a Bearer header:
curl -H "Authorization: Bearer <token>" http://127.0.0.1:3000/api/sources
Sample feature IDs are 1, 2, and 3. BIGINT attributes are decimal strings to preserve precision; the configured identifier is a safe integer.
See configuration and deployment for the next steps.