Hosting Widgets
#
Requirements for Test Web ServersTo 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 ServersWhen 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 taskYou 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- Install an HTTP-server using NPM:
- Run the server over HTTPS on port 8443 with CORS enabled:
#
ResultOnce running, you see the log. By default, the server uses your local IP on port 8443.
#
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 URLTo allow Workspaces to load your hosted widgets you need to enable and configure the Library URL in Workspaces Administration under UX Profiles.