Skip to content

Guides

Deployment

What changes when your app moves off localhost.

Two things change when you deploy: Clivly needs your real tick URL, and a serverless host needs somewhere durable to keep sync cursors.

Point the sync trigger at your deployed URL

While developing, clivly dev opens a tunnel and registers it for you. In production the URL is your own.

.env
CLIVLY_SYNC_TRIGGER_URL=https://yourdomain.com/api/clivly/tick

Confirm it took effect:

Package manager
terminal
npx clivly status

Persist cursors on serverless hosts

A long-running server can hold sync cursors in memory. A serverless function cannot — it is torn down between invocations, and a lost cursor means the next sync re-reads from the beginning.

Serverless hosts need a cursor store

On Vercel, Cloudflare Workers, Lambda, or any host that does not keep your process alive, set cursorStore: kvCursorStore(env.MY_KV). Without it every delta sync re-reads your entire source tables — a full sync on every run, reported as a success.

See Cursor stores for the shipped store and how to write your own.

What Clivly Cloud calls, and how often

Clivly Cloud does not poll your sync trigger on a schedule. Your app's own cron owns sync cadence.

The only scheduled outbound call is a liveness probe: a HEAD request to your trigger URL, sent only when your app has not checked in for over a minute. An app whose heartbeat is working is never probed. A sync runs when your cron calls runScheduled(), or when someone clicks Run sync in the dashboard.