Mise à jour du fichier de configuration et patch MQTT
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
// Import necessary modules
|
||||
const mqtt = require('mqtt');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
// Load configuration
|
||||
const configPath = path.join(__dirname, '../config/configuration.json');
|
||||
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
||||
|
||||
// MQTT broker configuration
|
||||
const brokerUrl = 'mqtt://nanomq'; // Broker URL (change if needed)
|
||||
const brokerUrl = config.mqttHost;
|
||||
const clientId = 'buzzer_manager';
|
||||
const options = {
|
||||
clientId,
|
||||
|
||||
Reference in New Issue
Block a user