Created
September 12, 2020 01:33
-
-
Save JoaoPedroPP/78cd55f4787e5963b5e87a7b00a7b0c1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mqtt = require('mqtt'); | |
var client = mqtt.connect('mqtt://endereco', {port: port, username: 'username', password: 'password'}) | |
client.on('connect', function () { | |
client.on('message', (t, b) => { | |
console.log(b.toString()) | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment