move mqtt config to seperate file

This commit is contained in:
KarstenSiedentopp
2018-12-19 17:52:54 +01:00
parent efac9fa6da
commit e943c1e070
2 changed files with 6 additions and 9 deletions

View File

@@ -8,17 +8,9 @@ function bmap(istate) {
return istate ? 'ON' : "OFF";
}
function bmap(istate) {
return istate ? 'ON' : "OFF";
}
var connected = undefined;
const CONFIG = {
host: 'localhost',
port: 1883,
topic: "tuya/"
}
const CONFIG = require("./config");
const mqtt_client = mqtt.connect({
host: CONFIG.host,