@glue42/core
    TypeScript icon, indicating that this package has built-in type declarations

    5.6.1 • Public • Published

    Overview

    The @glue42/core package is the core Glue42 JavaScript module used in applications for sharing data with other Glue42 enabled applications. It can be used by applications hosted in Glue42, a browser or Node.js.

    The @glue42/core package is a subset of the @glue42/desktop package which offers tools for more advanced scenarios that require Window Management, Application Management, Activities, Layouts, Channels, etc.

    The @glue42/core package contains the following APIs:

    • Interop - an Interop API which enables applications to:

      • offer functionality to other applications (JavaScript and native) by registering Interop methods;
      • discover Interop methods and applications which offer Interop methods;
      • invoke Interop methods on the user desktop and across the network;
      • stream and subscribe to real-time data using a Streaming API;
    • Shared Contexts - a Shared Contexts API which provides a simple and effective way of sharing data between applications by using shared named data objects;

    • Metrics - use the Glue42 Metrics as a way of assessing the life cycle of a certain process (application performance, business process, employee productivity, etc.) by acquiring, recording and monitoring over time specific data about the key performance indicators of the said process;

    • Pub/Sub - a basic Pub/Sub API that allows apps to publish/subscribe for messages on a specific topic;

    Usage

    Running in Glue42

    import GlueCore from "@glue42/core";
    
    const initializeGlue42 = async () => {
        // You can pass an optional configuration object to the factory function.
        // If you do not privide configuration, it will be inferred from your application configuration file.
        const glue = await GlueCore();
    
        // Use the Glue42 APIs.
    };
    
    // Handle errors.
    initializeGlue42().catch(console.error);

    Running in Node.js

    Note that your Node.js script should be started by the Glue42 Desktop client in order to receive a gwToken and a gwURL.

    import GlueCore from "@glue42/core"
    
    const initializeGlue42 = async () => {
    
        const config = {
            application: "MyNodeApp",
            gateway: {
                protocolVersion: 3,
                ws: process.env.gwURL
            },
            auth: {
                gatewayToken: process.env.gwToken
            }
        };
    
        const glue = await GlueCore(config);
    
        // Use the Glue42 APIs.
    };
    
    // Handle errors.
    initializeGlue42().catch(console.error);

    Install

    npm i @glue42/core

    Homepage

    glue42.com/

    DownloadsWeekly Downloads

    612

    Version

    5.6.1

    License

    MIT

    Unpacked Size

    2.41 MB

    Total Files

    10

    Last publish

    Collaborators

    • kiril.popov
    • gdavidkov
    • flashd2n