makeWorker
makeWorker<
TEnv,TDurableObjectRpc,TSyncPayload>(options):CFWorker<TEnv,TDurableObjectRpc>
Defined in: packages/@livestore/sync-cf/src/cf-worker/worker.ts:56
Produces a Cloudflare Worker fetch handler that delegates sync traffic to the
Durable Object identified by syncBackendBinding.
For more complex setups prefer implementing a custom fetch and call handleSyncRequest
from the branch that handles LiveStore sync requests.
Type Parameters
Section titled “Type Parameters”TDurableObjectRpc
Section titled “TDurableObjectRpc”TDurableObjectRpc extends undefined | DurableObjectBranded = undefined
TSyncPayload
Section titled “TSyncPayload”TSyncPayload = JsonValue
Parameters
Section titled “Parameters”options
Section titled “options”MakeWorkerOptions<TEnv, TSyncPayload>
Returns
Section titled “Returns”CFWorker<TEnv, TDurableObjectRpc>