Skip to content

Local development

  • Node.js 20+
  • Corepack enabled
  • Yarn 4 (repo standard)

From repo root:

Terminal window
yarn install
yarn workspace cosmos-digital-services dev

Default local URL is typically http://localhost:4321.

Terminal window
yarn workspace cosmos-digital-services lint
yarn workspace cosmos-digital-services test:unit
yarn workspace cosmos-digital-services test:e2e

From repo root:

Terminal window
yarn workspace cosmos-digital-services worker:dev:gateway
yarn workspace cosmos-digital-services worker:dev:image

These commands run Wrangler dev using:

  • workers/wrangler.gateway.toml
  • workers/wrangler.image.toml
  • App/browser variables go in app .env (see Environment variables).
  • Worker-only variables live in Wrangler config and env blocks.
  • For auth-related testing, ensure Access and verify endpoint configuration align with your target environment.
  • Session endpoint returning HTML locally usually means worker route/config mismatch for that host.
  • Unexpected maintenance page rewrite: check PUBLIC_MAINTENANCE_MODE.
  • Browser fetch blocked: verify CSP in public/_headers.