Interface Config

interface Config {
    enableWebsocketConnection?: true;
    externalWebsocketConnection?: WebSocket;
    maxDrift: number;
    minimumLogLevel:
        | "none"
        | "trace"
        | "debug"
        | "warning";
    name: string;
    reloadUrl: string;
    syncUrl: string;
}

Hierarchy (view full)

Properties

enableWebsocketConnection

Enables websocket connection

If set to true runs a websocket connection on the sync url

externalWebsocketConnection?: WebSocket

Allows to reuse websocket connections for multiple database setup

Works INSTEAD of enableWebsocket and if set overrides enableWebsocket this attaches the database to a connection produced by a call back from another database that has enableWebsocketConnection

maxDrift: number

Maximum physical clock drift allowed in ms.

The default value is 5 * 60 * 1000 (5 minutes).

minimumLogLevel:
    | "none"
    | "trace"
    | "debug"
    | "warning"

Setting the minimum log level. The default value is none.

For development, use trace to log all events and debug to log only events with values. For production, use warning.

name: string

Evolu is multitenant - it can run more instances concurrently. Every Evolu instance has to have its own unique name. Database files are separated and invisible to each other.

The default value is: Evolu.

reloadUrl: string

URL to reload browser tabs after Owner reset or restore.

The default value is /.

syncUrl: string

URL for Evolu sync and backup server.

The default value is https://evolu.world.