Skip to content

Instantly share code, notes, and snippets.

@ckindley
ckindley / app_mqtt_mysql.js
Created June 4, 2018 20:25 — forked from smching/app_mqtt_mysql.js
Node.js application: Store messages from Mosquitto MQTT broker into SQL Database
var mqtt = require('mqtt');
var Topic = '#'; //subscribe to all topics
var Broker_URL = 'mqtt://192.168.1.123';
var Database_URL = '192.168.1.123';
var options = {
clientId: 'MyMQTT',
port: 1883,
//username: 'mqtt_user',
//password: 'mqtt_password',