This is a minimal rclnodejs demo using Electron. More information about Electron, please check with Electron documentation.
The demo includes the following files:
package.json
- Points to the app's main file and lists its details and dependencies.main.js
- Introduces therclnodejs
native module, starts the app and creates a browser window to render HTML. This is the app's main process.index.html
- Includes a text editor where you can input the the topic to be published. This is the app's renderer process.renderer.js
- Communicate with main process to publish a topic and get it through a subscription.
Before starting, please ensure you have installed nodejs.
- Clone this repository.
git clone https://github.com/RobotWebTools/rclnodejs.git
- Go into the demo.
cd rclnodejs/electron_demo
-
Install dependencies
npm install
- Rebuild rclnodejs for Electron
# Every time you run "npm install", run this:
./node_modules/.bin/electron-rebuild
- Run the app
npm start
If it works, you can see the demo as:
- electronjs.org/docs - all of Electron's documentation.
- Native Node Modules - Use a native node module.