Skip to main content

foundation-comms.getconnect

Home > @genesislcap/foundation-comms > getConnect

getConnect() function

Get Connect from the DI container.

Signature:

export declare function getConnect(): Connect;

Returns:

Connect

Remarks

A utility method for host applications that are not using decorators or the DI container.

Example

import { getConnect } from '@genesislcap/foundation-comms';
import { API_HOST } from '@genesislcap/foundation-utils';
...
private connect = getConnect();
...
const connected = await this.connect.connect(API_HOST); // < WebSocket url