diff --git a/Dockerfile b/Dockerfile index 85259ce..055dd92 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,7 @@ WORKDIR /app COPY package*.json ./ RUN npm ci --only=production +#RUN npm install COPY . . diff --git a/dht.js b/_archive/dht.js similarity index 98% rename from dht.js rename to _archive/dht.js index a924c9b..b4bcf54 100644 --- a/dht.js +++ b/_archive/dht.js @@ -64,12 +64,12 @@ app.use(morgan('combined')); //defining endpoints //!UI -var auth = require('./src/auth.js'); +var auth = require('../src/auth.js'); var ac = require('./ac.js'); -var db = require('./src/db'); -var mqtt = require('./src/mqtt.js'); -var ir = require('./src/devices/ir'); -var u = require('./src/utils'); +var db = require('../src/db'); +var mqtt = require('../src/mqtt.js'); +var ir = require('../src/devices/ir'); +var u = require('../src/utils'); app.use(auth.init()); diff --git a/ecosystem.config.js b/_archive/ecosystem.config.js similarity index 100% rename from ecosystem.config.js rename to _archive/ecosystem.config.js diff --git a/package-lock.json b/package-lock.json index 5a94be4..5442995 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2793,19 +2793,6 @@ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", "optional": true }, - "node_modules/fs-ext": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/fs-ext/-/fs-ext-0.5.0.tgz", - "integrity": "sha512-ps+JdoiKfFzsAe+d7Wm7nQyPY30QCtRD3/uvdczARPDJhpjMNbcRwh/I4k82kThLHTbUGkOY8Ex04xE5F7/Umg==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "nan": "^2.0" - }, - "engines": { - "node": ">= v0.8.0" - } - }, "node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -2824,19 +2811,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/fstream": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", diff --git a/src/mqtt.js b/src/mqtt.js index 146826a..ca59a3b 100644 --- a/src/mqtt.js +++ b/src/mqtt.js @@ -22,6 +22,7 @@ var mqtt_settings = { }; if (typeof credentials !== "undefined") { + console.log("MQTT: trying SECURE connection"); mqtt_settings.secure = { host: process.env.MQTT_HOST || config.mqttIP, port: process.env.MQTT_PORT_HTTPS || config.mqttPortHttps || 8444,