Indigo Web Server

The Indigo Server contains a fully-functioning web server that you can use to serve content locally or via the Indigo Reflector Service (the Reflector requires an active Indigo Up To Date subscription). You can use this functionality to make content available in a variety of ways. For example, Indigo users have created complex web sites using JavaScript, Vue, and Svelte. See below for a fully-functional example.

Web Assets Folder Structure

Indigo 2022.1 contains special folders that are accessible to the Indigo Web Server which are located in:

/Library/Application Support/Perceptive Automation/Indigo 2022.1/Web Assets/

There are four stock folders located under this parent folder:

/Library/Application Support/Perceptive Automation/Indigo 2022.1/Web Assets/images
/Library/Application Support/Perceptive Automation/Indigo 2022.1/Web Assets/plugins
/Library/Application Support/Perceptive Automation/Indigo 2022.1/Web Assets/public
/Library/Application Support/Perceptive Automation/Indigo 2022.1/Web Assets/static

As a convenience, you can access these folders under the Indigo Help menu: Help –> Show Web Assets Folder

All assets you want to make available to the Indigo Web Server should be stored in these folders.

images folder

This folder is used to publish files and make them available in the Indigo UI for use in control pages (and for other purposes). More information on using this folder can be found in the Custom Images on Control Pages page.

plugins folder

With Indigo 2022.1, web server plugins are no longer supported.

public folder

This directory can be used to publish files from the Indigo Web Server that will be made available to anyone without any authentication. If someone knows the URL of your reflector, they will have access to any files that are in this directory, so use it wisely.

For example:

https://MYREFLECTOR.indigodomo.net/public/about.txt
http://10.0.1.2:8176/public/about.txt
http://localhost:8176/public/about.txt

Basic MIME types will be determined from file extensions. Subdirectories are also allowed so you can create hierarchy:

https://MYREFLECTOR.indigodomo.net/public/somedirectory/somefile.html
https://MYREFLECTOR.indigodomo.net/public/images/somepic.jpg

Any files and/or directories in the /public/ folder will need to be moved over when you upgrade to a new major version (the installer WILL NOT move them automatically). The public folder was added with Indigo version 7.1.

static folder

This directory can be used to publish files from the Indigo Web Server that will be made available to anyone with authentication. If someone knows the URL of your reflector, they will have access to any files that are in this directory once they have entered the appropriate authentication credentials for your reflector.

For example:

https://MYREFLECTOR.indigodomo.net/static/about.txt
http://10.0.1.2:8176/static/about.txt
http://localhost:8176/static/about.txt

Basic MIME types will be determined from file extensions. Subdirectories are also allowed so you can create hierarchy:

https://MYREFLECTOR.indigodomo.net/static/somedirectory/somefile.html
https://MYREFLECTOR.indigodomo.net/static/images/somepic.jpg

Authentication

Information on Indigo Authentication options can be found on the Restful URLS page under the authentication section.

Example

Using the Indigo Web Server and Web Assets folders is extremely easy. This example is for reference purposes and is not meant to be a primer on constructing Web content. There are many good tutorials online that you can refer to if needed.

First, create your content. For example, web sites often contain a index.html page. A simple index.html page looks like this:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Indigo Web Server</title>
  </head>
  <body style="height:100%; width:100%">
    <div id="content" style="position:absolute; top:0px; left:0px; height:200px; right:0px;overflow:hidden;">
      Hello world.
    </div>
  </body>
</html>

Using a plain text editor, save this code as index.html within the …/Web Assets/static folder (to serve it with authentication) or within the …/Web Assets/public folder (to serve it without authentication). You can refer to assets located in other folders by referencing them with the Web Assets folder as the root.

That's it! The Indigo Web Server will serve your web page via the appropriate method.

indigo_2022.1_documentation/indigo_web_server.txt · Last modified: 2022/11/13 02:20 by davel17
 

© Perceptive Automation, LLC. · Privacy