mqttest/iotpubcli.js

changeset 0
e8ccd40d0ef6
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/mqttest/iotpubcli.js	Thu Jun 04 14:50:33 2015 +0200
     1.3 @@ -0,0 +1,9 @@
     1.4 +// Simple publish client
     1.5 +
     1.6 +//var mqtt = require('mqtt'), locli = mqtt.connect('mqtt://test.mosquitto.org/');
     1.7 +//var mqtt = require('mqtt'), locli = mqtt.connect('mqtt://192.168.42.250/');
     1.8 +var mqtt = require('mqtt'), locli = mqtt.connect('mqtt://raspeinz.local/');
     1.9 +locli.publish('iotmsg', 'Mqtt');
    1.10 +locli.publish('iotmsg', 'is pretty cool');
    1.11 +//locli.publish('messages', 'remember that!', {retain: true});
    1.12 +locli.end();

mercurial