SyncBackendOptions
Defined in: packages/@livestore/sync-electric/src/index.ts:108
Properties
Section titled “Properties”endpoint
Section titled “endpoint”endpoint:
string
| {ping
:string
;pull
:string
;push
:string
; }
Defined in: packages/@livestore/sync-electric/src/index.ts:117
The endpoint to pull/push events. Pull is a GET
request, push is a POST
request.
Usually this endpoint is part of your API layer to proxy requests to the Electric server
e.g. to implement auth, rate limiting, etc.
Examples
Section titled “Examples”"/api/electric"
{ push: "/api/push-event", pull: "/api/pull-event" }
optional
ping:object
Defined in: packages/@livestore/sync-electric/src/index.ts:125
enabled?
Section titled “enabled?”
optional
enabled:boolean
Default
Section titled “Default”true
requestInterval?
Section titled “requestInterval?”
optional
requestInterval:DurationInput
How often to send ping requests
Default
Section titled “Default”10 seconds
requestTimeout?
Section titled “requestTimeout?”
optional
requestTimeout:DurationInput
How long to wait for a ping response before timing out
Default
Section titled “Default”10 seconds