How to...

Glue42 Enable Your App

Quick Guide

To Glue42 enable your app, you need to do 3 things:

  • reference the respective Glue42 library (JavaScript, .NET, Java, etc.);
  • initialize the Glue42 library;
  • create an application definition and add it to the Glue42 Enterprise configurations folder;

The following is an example of configuring a simple web app. Create your own basic web app or use this JavaScript test app skeleton and follow the steps in the guide below to test in practice how to Glue42 enable an application and add it to the Glue42 Application Manager. If you choose to use the provided test app skeleton, see the README.md for instructions on how to run it.

On how to reference and initialize Glue42 in a .NET, Java, Angular, React or Node.js environment, see the respective technology menu items in the Glue42 Enable Your App section.

  1. Reference the Glue42 library file in a <script> tag. If you are using the example app skeleton provided above, the Glue42 library file is is named desktop-4.8.0.js:
<script type="text/javascript" src="desktop-4.8.0.js"></script>
  1. Initialize the Glue42 library.

To initialize the Glue42 library, place this code snippet in a <script> tag directly in the index.html or in the index.js file (which you have to reference in your index.html):

const init = async () => {
    window.glue = await Glue();
};

init().catch(console.error);

Your index.html should now look something like this:

<body>
    <h1>My Test App</h1>
    <div>
        <p>
            Some Data
        </p>
    </div>
</body>
<script type="text/javascript" src="desktop-4.8.0.js"></script>
<script>
    const init = async () => {
        window.glue = await Glue();
        console.log(`Glue42 initialized successfully!\nGlue42 version: ${glue.version}`);
    };

    init().catch(console.error);
</script>
  1. Create an application definition.

To show your app in the Glue42 Enterprise App Manager dropdown menu, you need to create an application configuration .json file. You should place this file in the %LocalAppData%\Tick42\UserData\<ENV-REG>\apps folder where <ENV-REG> should be replaced with the region and environment folder name used for the deployment of your Glue42 Enterprise - e.g., T42-DEMO. If you are using the provided test app, you can simply copy the provided js-test-app.json configuration file to that location. Otherwise, you can see below how to create a quick and simple application definition:

{
    "name": "test-app",   // required
    "title": "My Test App",
    "type": "window",   // required
    "details": {        // required
        "url": "http://localhost:3333/index.html", //required
        "mode": "tab",
        "width": 500,
        "height": 400
    }
}
  1. Start your application.

Now you can start your application from the Glue42 Enterprise Toolbar. You can open the console of the app window by pressing F12 to see the printed successful initialization message. You can also start exploring the Glue42 APIs by accessing the glue object that was attached to the global window object during initialization.

That's it! You now have your first Glue42 enabled app!

For more advanced configuration settings, visit the Configuration section.

See also:

  • Our full Tutorials on integrating Glue42 Enterprise functionalities in your apps.
  • Our Examples section for example Glue42 Enterprise functionality implementations and example apps we have developed for testing purposes.
  • Get acquainted with the core Glue42 Concepts and learn how to work programmatically with the Glue42 Enterprise platform.
  • Reference