Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

Lightstreamer - Basic Stock-List Demo - Electron Client

This project contains a demo application showing the integration between the Lightstreamer JavaScript Client library and Electron.

Live Demo

Demo ScreenShot

View OS X live demo
View Windows live demo
View Linux live demo

(download the platform source zip; unzip it; launch "lightstreamer-basic-stock-list-demo" executable.)

Details

This demo displays real-time market data for ten stocks generated by a feed simulator and is based on Basic Stock-List Demo.
This project shows how is it possible to integrate the JavaScript Client API for Lightstreamer into Electron, in order to quickly create cross-platform desktop apps embedding real-time web technologies.

If you want to go deeper into Electron, check out the Electron site.

Install

If you want to install a version of this demo pointing to your local Lightstreamer Server, create a local clone of this repository on your computer and follow these steps:

  • If you don't have npm installed on your system, please install it.
  • 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.
  • Get the lightstreamer.min.js file from npm or unpkg and put it in the src/StockListDemo_Basic/js folder of the demo (if that is the case, please create it). Alternatively, you can generate a customized lightstreamer.min.js library containing only the classes you actually use; see the build instructions on the GitHub page. In that case, be sure to include the LightstreamerClient, Subscription, StaticGrid and StatusWidget modules.
  • Get the require.js file from requirejs.org and put it in the src/StockListDemo_Basic/js folder of the demo.
  • From command line go into the Lightstreamer-example-StockList-client-electron folder and run npm install.

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,"DEMO");

in index.html and change it accordingly.

The demo is now ready to be launched with npm start.

Build

To build the demo app, follow these steps:

  • Install Electron Packager by running npm install electron-packager -g.
  • From command line go into Lightstreamer-example-StockList-client-electron folder and run electron-packager <sourcedir> <appname> --platform=<platform> --arch=<arch> --version=<Electron version> [optional flags...] specifying the right parameters for the desired platform (more info).

For instance, a build for the OS X x64 platform can be done by running:

electron-packager . BasicStockListDemo --platform=darwin --arch=x64 --version=0.35.6

See Also

Lightstreamer Adapters Needed by These Demo Clients

Related Projects

Lightstreamer Compatibility Notes

  • Compatible with Lightstreamer JavaScript Client library version 6.0 or newer (installation instructions for version 8.0 or newer).

About

This project contains a demo client showing integration between Lightstreamer JavaScript Client library and Electron

Resources

License

Releases

No releases published
You can’t perform that action at this time.