added pengguna,kurir page, with socket.io,need to switch this to node.js first

This commit is contained in:
kicap1992
2025-05-16 11:43:38 +08:00
parent 5329fb8265
commit 0ba4e846dc
1095 changed files with 12336 additions and 35 deletions

26
public/index2.html Normal file
View File

@ -0,0 +1,26 @@
<!-- public/index2.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Emitter Page</title>
</head>
<body>
<h2>This is index2.html (Emitter)</h2>
<button onclick="emitScan()">Emit scan_dia_lagi</button>
<script src="https://cdn.socket.io/4.7.5/socket.io.min.js"></script>
<script>
const socket = io();
socket.on('connect', () => {
console.log('Connected to server:', socket.id);
});
function emitScan() {
socket.emit('scan_dia_lagi', 'Hello from index2.html!');
console.log('📤 Emitted scan_dia_lagi');
}
</script>
</body>
</html>