DEPLOYING THE DEMOS ON AN EXTERNAL WEB-SERVER ============================================= Each of the subfolders of this "demos" directory contains the deployment of the front-end for each of the various demos that are pre-installed into Lightstreamer Server. These demos can be reached by pointing the browser to Lightstreamer Server, as explained in GETTING_STARTED.TXT, and following the links. Each demo can be directly reached by pointing the browser to the proper directory (for instance, the "/demos/StockListDemo" URL path recalls the Stock-List Demo). Please remind that the default installation of Lightstreamer Server listens on TCP port 8080. However, the canonical deployment of a Lightstreamer web application makes use of two separate servers (or server clusters), as shown in the second figure on the http://www.lightstreamer.com/architecture.htm page. That means that the actual pages and resources of your front-end should be deployed on a Web Server of your choice and Lightstreamer Server is only used to deliver the real-time updates (and not the static parts of the pages). In order to deploy one or more of the included demo front-ends on an external Web Server, you should follow these steps: 1) Make sure you have installed and run Lightstreamer Server, as explained in the GETTING_STARTED.TXT file (in the installation home directory). The default configuration for this Server distribution already includes the DEMO Adapter Set. 2) Make sure you have a Web Server installed and running. In production environments, the Web Server is usually installed on a different machine than Lightstreamer Server. For testing purposes, you can install the Web Server on the same machine as Lightstreamer Server, provided that you use different listening ports (but be aware of some browser dependent issues; see http://www.lightstreamer.com/vb/showthread.php?t=28 and the final remarks in http://www.lightstreamer.com/docs/client_web_jsdoc/Context.html#setDomain). 3) Copy the demo folders and each of the included resources (e.g. index.html, popup.html, ..., images, ls) to a directory in the Web server and make these folders accessible from a browser. 4) On the newly created folders, edit "index.html" and any other source file where the "context.setDomain" method is called with a null argument. The argument should be modified to specify the domain name of the machine that will be running the Web Server (e.g. "mycompany.com"). NOTE: Lightstreamer Server and the Web Server must be hosted on machines that share the same domain name. So a correct DNS configuration is necessary for the demo to work. (If no DNS is available, you can work around this by editing your hosts file; see "Web Client Dev.pdf" for further details). 5) On the newly created folders, edit "index.html" and any other source file where the "connection.setLSHost" method is called with a null argument. The argument should be modified to specify the complete host name of the machine that is running Lightstreamer Server (e.g. "push.mycompany.com"). 6) On the newly created folders, edit "index.html" and any other source file where the "connection.setLSPort" method is called with a null argument. The argument should be modified to supply the port number specified in the subelement of the block in Lightstreamer Server configuration file ("lightstreamer_conf.xml"); the factory setting is 8080. 7) The installed demos are now ready to be launched. Request the "index.html" page or the installation folder root to your Web Server with a browser. E.g.: http://www.mycompany.com/demos/StockListDemo/index.html NOTE: The complete host name of the Web Server (e.g. "www.mycompany.com") must be used in the above URL. Using "localhost" or a shortcut name or the IP address will cause a security error on the browser.