interface · Node only
RelayOptions
@toip-tools/relayView sourceimport { type RelayOptions } from "@toip-tools/relay";
Declaration
interface RelayOptions {
port: number;
dbPath: string;
/** The URL clients use, e.g. wss://relay.example.com/v1. Defaults to ws://<host>:<port>/v1, or ws://localhost:<port>/v1 when bound to every interface. */
publicUrl?: string;
host?: string;
log?: (line: string) => void;
limits?: Partial<RelayLimits>;
/** Called for every message the relay accepts: what an operator can see (sender, recipient, size, time), never the contents. */
onStored?: (m: StoredMessage) => void;
}
Properties
portrequirednumberdbPathrequiredstringpublicUrloptionalstring | undefinedThe URL clients use, e.g. wss://relay.example.com/v1. Defaults to ws://
: /v1, or ws://localhost: /v1 when bound to every interface. hostoptionalstring | undefinedlogoptional((line: string) => void) | undefinedlimitsoptionalPartial<RelayLimits> | undefinedonStoredoptional((m: StoredMessage) => void) | undefinedCalled for every message the relay accepts: what an operator can see (sender, recipient, size, time), never the contents.