Skip to content
Expo LynxExpo Lynx

Local development

Test the same Worker, D1, R2, and mobile contract locally.

Use three terminals from the repository root:

Terminal window
# Terminal 1: Vite console, local D1/R2, and LAN-accessible Worker.
pnpm lynx console
# Terminal 2: Expo app.
pnpm start
# Terminal 3: from the independent mini-app repository after a source change.
pnpm lynx release

The release command builds the Lynx feature, packages release.zip, uploads it to the local Worker, and registers the immutable bundle. It does not enable it. Open the local console, choose the bundle, and enable delivery.

For a physical iPhone, compile the app with the LAN Worker URL printed by pnpm lynx console, for example http://192.168.x.x:8787/v1/default/delivery. Never use localhost on a phone. HTTP is allowed only in an internal Release build with LYNX_ALLOW_LOCAL_MANAGED_RELEASE=1; production must use HTTPS.

The local Worker persists D1 and R2 data under apps/console/.wrangler/delivery-worker-v2. To inspect D1 in TablePlus, select the newest Wrangler-managed .sqlite file in that directory; do not commit its path because Wrangler controls the filename.