diff --git a/back-end/mqtt/subscriber.js b/back-end/mqtt/subscriber.js index e49679e..b39e867 100644 --- a/back-end/mqtt/subscriber.js +++ b/back-end/mqtt/subscriber.js @@ -1,9 +1,7 @@ const mqtt = require('mqtt'); -require('dotenv').config(); -const CONFIG = require('../../config.json'); -const brokerHost = CONFIG.mosquitto.host; -const brokerPort = CONFIG.mosquitto.port; +const brokerHost = 'mosquitto'; +const brokerPort = 1883; const { ch_temperature, diff --git a/front-end/src/components/charts/DoughnutChart.js b/front-end/src/components/charts/DoughnutChart.js index c2262b9..2780a18 100644 --- a/front-end/src/components/charts/DoughnutChart.js +++ b/front-end/src/components/charts/DoughnutChart.js @@ -2,10 +2,9 @@ import { Doughnut } from 'react-chartjs-2'; import axios from 'axios'; import { Chart as ChartJS, ArcElement, Legend, Tooltip, plugins } from "chart.js"; import { useEffect, useState } from 'react'; -const CONFIG = require('../../../../config.json'); -const backEndHost = CONFIG["back-end"].host; -const backEndPort = CONFIG["back-end"].port; +const backEndHost = 'back-end'; +const backEndPort = 3000; ChartJS.register( ArcElement,