Configuration

io.Connect Desktop

To configure io.Connect Desktop to connect to io.Bridge, use the "gw" top-level key in the system.json system configuration file of io.Connect Desktop located in the <installation_location>/interop.io/io.Connect Desktop/Desktop/config folder.

First, you must enable the io.Connect Gateway version that supports connecting to io.Bridge by setting the "useBeta" property to true:

{
    "gw": {
        "useBeta": true
    }
}

Then, use the "cluster" property of the "configuration" object to configure io.Connect Desktop to connect to io.Bridge:

{
    "gw": {
        "configuration": {
            "cluster": {
                "enabled": true,
                "type": "p2p",
                "p2p": {
                    "directory": {
                        "type": "rest",
                        "config": {
                            "directory_uri": "https://my-io-bridge.com:8383",
                            "announce_interval": 30000
                        }
                    }
                }
            }
        }
    }
}

The "cluster" object has the following properties:

Property Type Description
"enabled" boolean If true, will allow the io.Connect Gateway embedded in io.Connect Desktop to connect to io.Bridge.
"type" string Type of the cluster to which to connect. Must be set to "p2p".
"p2p" object Describes the cluster to which to connect. Use the "directory" property of the "p2p" object to configure the connection to io.Bridge.

The "directory" object has the following properties:

Property Type Description
"type" string Type of the discovery mechanism used for connecting members with each other within the cluster. Must be set to "rest".
"config" object Settings for connecting to io.Bridge.

The "config" object has the following properties:

Property Type Description
"announce_interval" string Interval in milliseconds at which the io.Connect Gateway will ping io.Bridge. Defaults to 10000.
"directory_uri" string URL pointing to the location of io.Bridge. Defaults to "http://localhost:8888".

io.Connect Browser

Connecting to io.Bridge from an io.Connect Browser project requires modifying the configuration for initializing the @interopio/browser-platform library in the Main app.

To configure io.Connect Browser to connect to io.Bridge, use the cluster property of the gateway top-level key in configuration object for initializing the @interopio/browser-platform library:

import IOBrowserPlatform from "@interopio/browser-platform";

const config = {
    licenseKey: "my-license-key",
    gateway: {
        cluster: {
            // URL pointing to io.Bridge.
            url: "https://my-io-bridge.com:8383",
        }
    }
};

const { io } = await IOBrowserPlatform(config);