feat: Ajout serveur transcript

This commit is contained in:
UltraLionFr
2025-08-27 19:01:26 +02:00
parent 3a80bc476e
commit 224f37b374
3 changed files with 15 additions and 8 deletions
+6 -5
View File
@@ -1,6 +1,7 @@
const fs = require('fs');
const path = require('path');
const express = require('express');
const { config } = require('../../handlers/configLoader');
module.exports = {
name: 'clientReady',
@@ -12,9 +13,7 @@ module.exports = {
app.use('/transcript', express.static(transcriptsPath));
app.get('/', (req, res) => {
res.send(
'✅ Serveur Transcript actif. Utilise /transcript/:id pour voir un ticket.'
);
res.send('✅ Serveur Transcript actif. Utilise /transcript/:id pour voir un ticket.');
});
app.get('/transcript/:id', (req, res) => {
@@ -27,8 +26,10 @@ module.exports = {
});
const PORT = process.env.TRANSCRIPT_PORT || 3000;
const DOMAIN = process.env.TRANSCRIPT_DOMAIN || 'http://localhost';
app.listen(PORT, () => {
console.log(`🌐 Serveur Transcript dispo sur http://localhost:${PORT}`);
console.log(`🌐 Serveur Transcript dispo sur ${DOMAIN}:${PORT}`);
});
},
};
};