-1:000000000000 | 0:d9704646c767 |
---|---|
1 // Simple publish client | |
2 | |
3 //var mqtt = require('mqtt'), locli = mqtt.connect('mqtt://test.mosquitto.org/'); | |
4 //var mqtt = require('mqtt'), locli = mqtt.connect('mqtt://192.168.42.250/'); | |
5 var mqtt = require('mqtt'), locli = mqtt.connect('mqtt://raspeinz.local/'); | |
6 locli.publish('iotmsg', 'Mqtt'); | |
7 locli.publish('iotmsg', 'is pretty cool'); | |
8 //locli.publish('messages', 'remember that!', {retain: true}); | |
9 locli.end(); |