This project contains a demo application showing the integration between the Lightstreamer JavaScript Client library and Electron.
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.
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 thejs
folder of the demo (if that is the case, please create it). - From command line go into the
Lightstreamer-example-StockList-client-electron
folder and runnpm 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 renderer.js
and change it accordingly.
The demo is now ready to be launched with npm start
.
To build the app by using Electron Forge, run the command npm run make
.
Electron Forge creates the out
folder where your package will be located.
- Lightstreamer - Stock-List Demo - Java Adapter
- Lightstreamer - Reusable Metadata Adapters - Java Adapter
- Lightstreamer - Stock-List Demos - HTML Clients
- Lightstreamer - Basic Stock-List Demo - Flutter
- Lightstreamer - Basic Stock-List Demo - React Native
- Lightstreamer - Basic Stock-List Demo - Cordova
- Compatible with Lightstreamer JavaScript Client SDK version 9.0 and Lightstreamer Server 7.4.