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:
http-server ./custom-widgets -p 8443 --cors -S -C cert.pem -K key.pem

Result#

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

Starting up http-server, serving sample-library/bundle/
Available on:
https://127.0.0.1:8443
https://192.168.60.100: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.