Skip to content

Lightstreamer/Lightstreamer-example-PWAStockList-client-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lightstreamer - Progressive Stock-List Demo - HTML Client

This demo adheres to the standards of Progressive Web Apps (PWAs) to give users an experience similar to native apps. PWAs provide a number of advantages, including being installable, responsively designed, network independent and secure.

Live Demo

Demo ScreenShot

Details

The demo displays real-time market data for ten stocks, generated by a feed simulator.
This page uses the JavaScript Client API for Lightstreamer to handle the communications with Lightstreamer Server. A simple user interface is implemented to display the real-time data received from Lightstreamer Server.

The demo can be installed on the user device. The installation procedure varies from browser to browser. For example on Chrome an installation button should appear just below the stock table. Once installed, the demo runs in a standalone window instead of a browser tab and it is launchable from on the user's home screen, dock, taskbar, or shelf.

Like a native app the demo can run even if the user device is offline.
Try to turn off the network connection: the demo reacts by landing in another page. When the network connection is enabled again, the demo goes back to the main page.

Install

If you want to install the demo pointing to your local Lightstreamer Server, follow these steps:

  • Note that, as prerequisite, the Lightstreamer - Stock- List Demo - Java Adapter has to be deployed on your local Lightstreamer Server instance. Please check out that project and follow the installation instructions provided with it.
  • Launch Lightstreamer Server.

You can deploy the demo to use the Lightstreamer server as Web server or in any external Web Server you are running. If you choose the former case, please create the folders <LS_HOME>/pages/PWAStockListDemo then copy here the contents of the src/PWAStockListDemo folder of this project.
The client demo configuration assumes that Lightstreamer Server is at address https://push.lightstreamer.com. If you need to target a different Lightstreamer server, for example localhost, please search this line:

var lsClient = new LS.LightstreamerClient(protocolToUse+"//push.lightstreamer.com:"+portToUse,"DEMO");

in app.js and change it accordingly.

The demo is now ready to be launched.

See Also

Lightstreamer Adapters Needed by These Demo Clients

Related Projects

Lightstreamer Compatibility Notes

  • Code compatible with Lightstreamer Web Client Library version 8.0.0 or newer.
  • For Lightstreamer Server version 7.1 or greater.

About

Progressive Web App demo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •