var2 is a platform which connects programs which talk different protocols. As the current state, it supports HTTP, MQTT and CoAP. The project aims to add support to other popular application layer protocols in the future.
As the current state, the project is only built and tested under Linux systems. But this doesn't mean that you cannot build the project in Windows. Please check the prerequisites before trying.
- GCC
- libuv v1.x | For installing libuv, visit libuv's GitHub repository.
- Node.js v4.6.0+
- npm v2.15.9+
Download the code from the GitHub repository.
To build the var2-core
, run:
cd src
make
Install node_modules
which var2 depends on:
cd src/translator
npm install
To start the var2, run the following binary and Node.js files:
var2
in the directorysrc/
http-server.js
in the directorysrc/translator/
coap-server.js
in the directorysrc/translator/
mqtt-broker.js
in the directorysrc/translator/
Connect some HTTP, CoAP or MQTT clients with appropriate servers and publish, subscribe, GET and POST data.
Due to some reasons, the url / topic which HTTP/CoAP/MQTT clients deals with should only be a number of range 0 to 2147483647. Alphabets and symbols should not be used in url / topic.
Acceptable Usage
-
topic -
123456
-
topic -
111111
-
url -
/123456
-
url -
/101010
Not Acceptable Usage
-
topic -
123/456
-
topic -
123/*
-
topic -
123/+/456
-
topic -
123/#/456
-
url -
123/456
-
url -
123/456/789
The project is still in its initial stage. We'll try to document everything ASAP.
We appreciate all forms of contributions. Check out the issues which are still open and not assigned in the GitHub repository.