@interopio/browser-platform
v4.3.0
Published
IoConnect Browser main application package
Readme
@interopio/browser-platform
Overview
The @interopio/browser-platform library enables you to create a Main app for your io.Connect Browser projects and provides access to the io.Connect APIs.
Installation
To install the library, execute the following command:
npm install @interopio/browser-platformUsage
The following example demonstrates basic initialization of the @interopio/browser-platform library in a Main app.
ℹ️ For more details on using the
@interopio/browser-platformlibrary, see the io.Connect Browser Platform official documentation.
import IOBrowserPlatform from "@interopio/browser-platform";
// Configuration for initializing the library.
// The only required property is `licenseKey`.
const config = {
licenseKey: "my-license-key"
};
// Use the `io` property of the object returned by
// the factory function to access the io.Connect APIs.
const { io } = await IOBrowserPlatform(config);
// Using the io.Connect APIs.
await io.interop.register("myApp", () => {
console.log("Hello from myApp!");
});