DexieCloudOptions
Interface used as argument to db.cloud.configure()#options and available as a readonly property on db.cloud.options
export interface DexieCloudOptions {
// URL to a database created with `npx dexie-cloud create`
databaseUrl: string;
// Whether to require authentication or opt-in to it using db.cloud.login()
requireAuth?: boolean;
// Whether to use service worker. Combine with registering your own service
// worker and import "dexie-cloud-addon/dist/modern/service-worker.min.js" from it.
tryUseServiceWorker?: boolean;
// Optional customization of periodic sync.
// See https://developer.mozilla.org/en-US/docs/Web/API/PeriodicSyncManager/register
periodicSync?: {
// The minimum interval time, in milliseconds, at which the service-worker's
// periodic sync should occur.
minInterval: number;
};
// Disable default login GUI and replace it with your own by
// subscribing to the `db.cloud.userInteraction` observable and render its emitted data.
customLoginGui?: boolean;
// Array of table names that should be considered local-only and
// not be synced with Dexie Cloud
unsyncedTables?: string[];
// By default Dexie Cloud will suffix the cloud DB ID to your IndexedDB database name
// in order to ensure that the local database is uniquely tied to the remote one and
// will use another local database if databaseURL is changed or if dexieCloud addon
// is not being used anymore.
//
// By setting this value to `false`, no suffix will be added to the database name and
// instead, it will use the exact name that is specified in the Dexie constructor,
// without a suffix.
nameSuffix?: boolean;
// Disable websocket connection - don't listen to remote changes - effectively disabling eager sync from remote to local.
disableWebSocket?: boolean;
// Disable eager sync from local to remote
disableEagerSync?: boolean;
// Provides a custom way of fetching the JWT tokens. This option
// can be used when integrating with custom authentication.
// See https://dexie.org/cloud/docs/db.cloud.configure()#fetchtoken
fetchTokens?: (tokenParams: {
public_key: string;
hints?: { userId?: string; email?: string };
}) => Promise<TokenFinalResponse>;
}
Dexie Cloud Docs
- Access Control in Dexie Cloud
- Add demo users
- Add public data
- Authentication in Dexie Cloud
- Consistency in Dexie Cloud
- DBPermissionSet
- Dexie Cloud API
- Dexie Cloud CLI
- Dexie Cloud Docs
- Dexie Cloud REST API
- DexieCloudOptions
- Invite
- Limits
- Member
- PersistedSyncState
- Purchase Subscription
- Realm
- Role
- Run Dexie Cloud on Own Servers
- Sharding and Scalability
- SyncState
- UserLogin
- db.cloud.configure()
- db.cloud.currentUser
- db.cloud.currentUserId
- db.cloud.events.syncComplete
- db.cloud.invites
- db.cloud.login()
- db.cloud.logout()
- db.cloud.options
- db.cloud.permissions()
- db.cloud.persistedSyncState
- db.cloud.roles
- db.cloud.schema
- db.cloud.sync()
- db.cloud.syncState
- db.cloud.userInteraction
- db.cloud.usingServiceWorker
- db.cloud.version
- db.cloud.webSocketStatus
- db.members
- db.realms
- db.roles
- dexie-cloud-addon