You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
var mqtt = require('./'); |
|
var client = mqtt.connect('mqtt://test.mosquitto.org'); |
|
|
|
client.subscribe('presence'); |
|
client.publish('presence', 'Hello mqtt'); |
|
|
|
client.on('message', function (topic, message) { |
|
console.log(message.toString()); |
|
}); |
|
|
|
client.end();
|
|
|