Awesome
cluon-javascript
This project provides a minimum viable product (MVP) demonstrating how to communicate between JavaScript and OD4Sessions using libcluon and hence, connecting JavaScript and C++ to exchange data bi-directionally.
Table of Contents
Features
- Written in highly portable and high quality C++14
- Sending data in Protobuf from C++ to your JavaScript application
- Sending data in Protobuf from JavaScript to your C++ application
- Description of the C++ part of this ping-pong application
- Description of the JavaScript part of this ping-pong application
Dependencies
No dependencies! You just need a C++14-compliant compiler to compile this project as it ships its dependencies as part of the source distribution:
- libcluon -
Usage
This microservice is provided via Docker's public registry for:
- Running the webserver to serve the JavaScript application serving data from OD4Session
111
:
docker run --rm -ti --net=host chrberger/cluon-javascript-js-amd64:latest --cid=111
- Running the C++ demo program to send data in time-triggered mode:
docker run --rm -ti --net=host chrberger/cluon-javascript-cpp-amd64:latest ping-pong --cid=111
Now, simply point your web-browser to http://localhost:8082 and open the JavaScript console to see the output.
Building
- Description of the C++ part of this ping-pong application
- Description of the JavaScript part of this ping-pong application
License
- This project is released under the terms of the MIT License.