Nymph PubSub Config

interface Config {
    broadcastCounts: boolean;
    entries: string[];
    logger: ((...args) => void);
    originIsAllowed: ((origin) => boolean);
    relays: string[];
}

Properties

broadcastCounts: boolean

Allow clients to request to be notified when other clients subscribe to the same queries.

entries: string[]

The URLs of the Nymph-PubSub servers to directly publish to. These servers are how this host will enter the PubSub network. If you only have one PubSub server, it needs to be listed here.

logger: ((...args) => void)

Function to log PubSub info/error messages.

Type declaration

    • (...args): void
    • Parameters

      • Rest ...args: any[]

      Returns void

originIsAllowed: ((origin) => boolean)

Determine whether a client's origin is allowed to connect.

Type declaration

    • (origin): boolean
    • Parameters

      • origin: string

      Returns boolean

relays: string[]

The URLs of additional Nymph-PubSub servers to relay publishes to. If this host is a PubSub server, these servers are how it will continue into your PubSub network.