forked from jchomaz/Vulture
(fix) VNode: portable path
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
|
const path = require('path');
|
||||||
const ping = require('ping');
|
const ping = require('ping');
|
||||||
const mqtt = require('mqtt');
|
const mqtt = require('mqtt');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
// Lecture du fichier de configuration
|
// Lecture du fichier de configuration
|
||||||
const config = JSON.parse(fs.readFileSync('\services\\config\\config_network.json', 'utf8'));
|
const config = JSON.parse(fs.readFileSync(path.join('services','config','config_network.json'), 'utf8'));
|
||||||
|
|
||||||
// Extraction des informations de config
|
// Extraction des informations de config
|
||||||
const { hosts: { buzzers: { IP: buzzerIPs, MQTTconfig: { mqttHost, mqttTopic } } } } = config;
|
const { hosts: { buzzers: { IP: buzzerIPs, MQTTconfig: { mqttHost, mqttTopic } } } } = config;
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const mqtt = require('mqtt');
|
const mqtt = require('mqtt');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
// Lecture du fichier de configuration
|
// Lecture du fichier de configuration
|
||||||
const config = JSON.parse(fs.readFileSync('\services\\config\\config_game.json', 'utf8'));
|
const config = JSON.parse(fs.readFileSync(path.join('services','config','config_game.json'), 'utf8'));
|
||||||
|
|
||||||
// Extraction des informations de config
|
// Extraction des informations de config
|
||||||
const { services: { mqttHost, quizzcollector: { MQTTconfig: { mqttQuizzCollectorListTopic, mqttQuizzCollectorCmdTopic } } } } = config;
|
const { services: { mqttHost, quizzcollector: { MQTTconfig: { mqttQuizzCollectorListTopic, mqttQuizzCollectorCmdTopic } } } } = config;
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ function updateTeamTotalScore(teamColor, points) {
|
|||||||
|
|
||||||
|
|
||||||
// Lecture du fichier de configuration
|
// Lecture du fichier de configuration
|
||||||
const config = JSON.parse(fs.readFileSync('\services\\config\\config_game.json', 'utf8'));
|
const config = JSON.parse(fs.readFileSync(path.join('services','config','config_game.json'), 'utf8'));
|
||||||
|
|
||||||
// Extraction des informations de config
|
// Extraction des informations de config
|
||||||
const { services: { mqttHost, score: { MQTTconfig: { mqttScoreTopic, mqttScoreChangeTopic } } } } = config;
|
const { services: { mqttHost, score: { MQTTconfig: { mqttScoreTopic, mqttScoreChangeTopic } } } } = config;
|
||||||
|
|||||||
Reference in New Issue
Block a user