mqtt request/response broker based on aedes
// production
$ npm start
// starts with debug
$ npm run start:debug
make sure broker
file is executable:
$ 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
$ ./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:
- hostname string optional default 'localhost'
- port number optional default 1883
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
$ npm run build:docs