mqtt request/response broker based on aedes
// production $ npm start // starts with debug $ npm run start:debug
make sure broker file is executable:
broker
$ chmod u+x index.js
$ npm start -- -h localhost -p 1883 // or $ ./broker start -h 0.0.0.0 -p 1883 // or debug $npm run start:debug
press Ctrl + c
Ctrl
c
$ ./broker start ^C $
runs mocha specs in /test
$ npm test // or $ npm run test:debug
see all npm tasks defined in package.json.
var MqttReqResBroker = require('mqtt-reqres-broker');
constructor
send a request to an other client.
options:
callback callback function called when initialization done. only arg is "err".
returns instance of MqttReqResBroker
options null required; currently takes no options
callback function required; callback
closes the broker websocket and http servers.
var broker = new MqttReqResBroker() broker.initialize( { hostname: '127.0.0.1', port: 9999 }, function (err) { broker.start(null, function (err) { // .. }); } );
create annotated source documentation in doc/ folder, uses groc
doc/
$ npm run build:docs
mqtt-reqres-broker
mqtt request/response broker based on aedes
start mqtt reqres websocket broker
make sure
brokerfile is executable:start options
stop
press
Ctrl+ctest
runs mocha specs in /test
see all npm tasks defined in package.json.
API
Methods
MqttReqResBroker()
constructor
initialize(options, callback)
send a request to an other client.
options:
callback callback function called when initialization done. only arg is "err".
returns instance of MqttReqResBroker
start(options, callback)
options null required; currently takes no options
callback function required; callback
close(callback)
closes the broker websocket and http servers.
Example
Build docs
create annotated source documentation in
doc/folder, uses groc