Skip to content

ramonamorea/Lightstreamer-example-RSS-client-javascript

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lightstreamer - RSS News Demo - HTML Client

This project includes a simple web client front-end example for the Lightstreamer - RSS News Demo - Java Adapter.

Live Demo

screenshot
### View live demo

Details

The RSS News Reader Demo is a simple news aggregator that allows the user to subscribe to several RSS feeds and have the news pushed in real-time without refreshing the page or polling the server under the hood.
This page uses the JavaScript Client API for Lightstreamer to handle the communications with Lightstreamer Server and the demo starts with some feeds already subscribed to. You can add your own feeds or click on "+" to add random feeds.

The demo includes the following client-side functionalities:

  • A Subscription containing 1 item, subscribed to in DISTINCT mode feeding a DynaGrid containing the news.
  • A Subscription containing 1 item, subscribed to in COMMAND mode feeding a DynaGrid containing the list of feeds currently subscribed to.

Install

If you want to install a version of this demo pointing to your local Lightstreamer Server, follow these steps:

  • Note that, as prerequisite, the Lightstreamer - RSS News 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.
  • Get the lightstreamer.js file from the Lightstreamer 5 Colosseo distribution and put it in the src/js folder of the demo (if that is the case, please create it). Alternatively, you can build a lightstreamer.js file from the online generator. In that case, be sure to include the LightstreamerClient, Subscription, DynaGrid, and StatusWidget modules and to use the "Use AMD" version.
  • Get the require.js file form requirejs.org and put it in the src/js folder of the demo.

You can deploy this 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/demos/RSSDemo, then copy here the contents of the src folder of this project.
The client demo configuration assumes that Lightstreamer Server, Lightstreamer Adapters, and this client are launched on the same machine. If you need to target a different Lightstreamer server, please search this line:

var lsClient = new LightstreamerClient(protocolToUse+"//localhost:"+portToUse,"RSSDEMO");

in lsClient.js and change it accordingly. For example, if you want to target the adapter deployed in our online servers, you should substitute with this:

var lsClient = new LightstreamerClient(protocolToUse+"//push.lightstreamer.com","RSSDEMO");

The demo is now ready to be launched.

See Also

Lightstreamer Adapters Needed by This Demo Client

Related Projects

Lightstreamer Compatibility Notes

  • Compatible with Lightstreamer JavaScript Client library version 6.0 or newer.

About

This project includes a simple web client front-end example for the Lightstreamer RSS Demo Adapter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 65.5%
  • JavaScript 34.5%