add: improved the frontend and the backend by adding websockets

This commit is contained in:
Lukian 2025-04-07 22:46:04 +02:00
parent ecf7b61aca
commit fbf7821320
18 changed files with 255 additions and 65 deletions

13
back/api/newchannels.js Normal file
View file

@ -0,0 +1,13 @@
const express = require('express');
const { getConnection, getNewChannels } = require('../libs/mysql');
const router = express.Router();
router.get('/', async (req, res) => {
const connection = await getConnection();
const channels = await getNewChannels(connection);
connection.end();
res.send(channels);
});
module.exports = router;