UNPKG

@interopio/browser-platform

Version:

IoConnect Browser main application package

39 lines (26 loc) 1.28 kB
# @interopio/browser-platform ## Overview The [`@interopio/browser-platform`](https://www.npmjs.com/package/@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: ```cmd npm install @interopio/browser-platform ``` ## Usage The following example demonstrates basic initialization of the `@interopio/browser-platform` library in a Main app. > ℹ️ *For more details on using the `@interopio/browser-platform` library, see the **io.Connect Browser Platform** [official documentation](https://docs.interop.io/browser/developers/browser-platform/setup/index.html).* ```javascript 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!"); }); ```