From 012d590f40a829e7ef95b14d745b9424b30c9ffc Mon Sep 17 00:00:00 2001 From: x2Skyz Date: Thu, 27 Nov 2025 21:58:19 +0700 Subject: [PATCH] -comunicate-demo --- comunicate-demo/index.html | 553 +++++++++++++++++++++++++++++++++++ comunicate-demo/index.js | 26 ++ comunicate-demo/package.json | 17 ++ 3 files changed, 596 insertions(+) create mode 100644 comunicate-demo/index.html create mode 100644 comunicate-demo/index.js create mode 100644 comunicate-demo/package.json diff --git a/comunicate-demo/index.html b/comunicate-demo/index.html new file mode 100644 index 0000000..47308a1 --- /dev/null +++ b/comunicate-demo/index.html @@ -0,0 +1,553 @@ + + + + + + TTC Communication Client + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+

+ Authentication +

+
+
+ + + +
+
+ + +
+ + +
+
+ + +
+

+ Notification +

+ + +
+ + + + +
+ + +
+
No notifications yet
+
+
+ +
+ + +
+
+

+ Video Conference / VoIP +

+ + +
+
+ +
+ + +
+
+ +
+ + + + + +
+ +
+ +
+ You (Local) +
+
+
+ +

Camera Off

+
+
+
+ + +
+ +
+ Remote User +
+
+
+ +

Waiting for connection...

+
+
+
+
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/comunicate-demo/index.js b/comunicate-demo/index.js new file mode 100644 index 0000000..82de70a --- /dev/null +++ b/comunicate-demo/index.js @@ -0,0 +1,26 @@ +// 1. สร้างไฟล์นี้ในโฟลเดอร์เดียวกับ index.html +// 2. รันคำสั่ง: npm install express (ถ้ายังไม่มี) +// 3. สตาร์ทเซิร์ฟเวอร์: node server_frontend.js + +const express = require('express'); +const path = require('path'); +const app = express(); +const PORT = 80; // พอร์ตสำหรับหน้าเว็บ (แยกกับ API 1011) + +// ให้บริการไฟล์ Static ในโฟลเดอร์ปัจจุบัน +app.use(express.static(path.join(__dirname))); + +// Route หลักส่ง index.html +app.get('/', (req, res) => { + res.sendFile(path.join(__dirname, 'index.html')); +}); + +// สั่งให้ Listen ทุก IP ในเครื่อง (0.0.0.0) +app.listen(PORT, '0.0.0.0', () => { + console.log('---------------------------------------------------'); + console.log(`🚀 Frontend Server running!`); + console.log(`🏠 Local: http://localhost:${PORT}`); + console.log(`📡 Network: http://:${PORT}`); + console.log('---------------------------------------------------'); + console.log('To find your IP: Run "ipconfig" (Windows) or "ifconfig" (Mac/Linux)'); +}); \ No newline at end of file diff --git a/comunicate-demo/package.json b/comunicate-demo/package.json new file mode 100644 index 0000000..5ae9935 --- /dev/null +++ b/comunicate-demo/package.json @@ -0,0 +1,17 @@ +{ + "name": "comunicate-demo", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "type": "commonjs", + "dependencies": { + "express": "^5.1.0", + "path": "^0.12.7" + } +}