Bit more eyecandy

This commit is contained in:
Dorgeist
2025-04-02 13:17:10 +00:00
parent a596567204
commit e8106f64d3
3 changed files with 10 additions and 2 deletions

View File

@@ -4,11 +4,15 @@ var mqttserver=config.mqttserver.host; // mqtt-host aus json im configfile hole
var mqtt = require('mqtt'); // mqtt-module einbinden
var dateFormat = require('dateformat'); // date-format-module einbinden
var topica='#'; // variable in der das topic gehalten wird
const app = require('express')(); // http-express framework laden (macht routing, etc.)
const path = require('path');
const express = require('express');
const app = express(); // http-express framework laden (macht routing, etc.)
const http = require('http').Server(app); // http-server module laden
const io = require('socket.io')(http); // socket.io einbinden
var client=new Array(); // Haelt die einzelnen mqtt-clients je (browser-)client
app.use('/jquery', express.static(path.join(__dirname, 'node_modules', 'jquery', 'dist')));
app.get('/', (req, res) => { // Routing fuer index.html
res.sendFile(__dirname + '/index.html'); // index.html rauspusten
});