Skip to main content

Hosting Widgets

Requirements for Test Web Servers#

To test and use your widgets, you need to host your widget library using a web server. You can use any standard web server, such as HTTP-server or nginx. You must deploy the web server using HTTPS and configure the security certificates. When deploying a web server, you must consider the following:

  • If you use self-signed certificates, make sure the certificates are installed and trusted on the browser or OS environment. Otherwise, the browser will not trust the self-signed certificate and prevent Workspaces from loading the widgets.
  • The server must be enabled with Cross-origin resource sharing (CORS). For information about enabling CORS, see the documentation for your web server.
  • The directory where widgets are hosted is the bundle directory. This is the output destination of the build process used to build the sample library.

Requirements for Production Web Servers#

When hosting widgets in production, your web server must meet the following requirements:

  • The web server must be hosted on the same network as the Avaya Workspaces Solution.
  • The web server should have a network round-trip time (RTT) of less than 120 ms.
  • The web server should be configured for CORS.
  • The web server should be configured with HTTPS.

Hosting the Sample Widget Library#

About this task#

You can install a web server using NodeJS. The following example describes how you can launch a simple HTTP-server. Run the commands in the terminal ⁄ console.

Procedure#

  1. Install an HTTP-server using NPM:
npm install -g http-server
  1. Run the server over HTTPS on port 8443 with CORS enabled, ensure that you are running from the root location of your app so that the relative routing to the elements folder succeeds:
http-server ./elements -p 8443 --cors

Result#

Once running, you see the log. By default, the server uses your local IP on port 8443.

Starting up http-server, serving ./elements
http-server version: 14.1.1
http-server settings:
CORS: true
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none
Available on:
http://135.123.64.180:8443
http://192.168.1.41:8443
http://127.0.0.1:8443
Hit CTRL-C to stop the server

Configuring CORS#

  • If you host the widgets on Breeze Snap-in, refer to 'Administering HTTP CORS security' section in Administering Avaya Breeze® platform document.
  • If you host the widgets on Tomcat server, refer to the CORS Filter instruction.
  • You can also find more information for different servers on CORS Enabled.

Configuring the Widget Library URL#

To allow Workspaces to load your hosted widgets you need to enable and configure the Library URL in Workspaces Administration under UX Profiles.