Skip to content

Commit

Permalink
Setting up service names
Browse files Browse the repository at this point in the history
  • Loading branch information
Kneatrum committed Aug 20, 2024
1 parent 2730442 commit ce1ddd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 2 additions & 4 deletions back-end/mqtt/subscriber.js
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
5 changes: 2 additions & 3 deletions front-end/src/components/charts/DoughnutChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ce1ddd1

Please sign in to comment.