mirror of
https://github.com/ershisan99/mlb-overlay-server.git
synced 2025-12-16 12:33:39 +00:00
clean up
This commit is contained in:
@@ -39,7 +39,6 @@ app.post("/", async (c) => {
|
|||||||
const data = await c.req.json();
|
const data = await c.req.json();
|
||||||
console.log('post received', 'body: ', data);
|
console.log('post received', 'body: ', data);
|
||||||
|
|
||||||
// Forward the received data to all connected Socket.IO clients
|
|
||||||
io.emit('event', data);
|
io.emit('event', data);
|
||||||
|
|
||||||
return c.text("OK");
|
return c.text("OK");
|
||||||
@@ -53,13 +52,6 @@ const io = new Server(httpServer,{ cors: {
|
|||||||
}});
|
}});
|
||||||
|
|
||||||
io.on('connection', (socket) => {
|
io.on('connection', (socket) => {
|
||||||
console.log('it might work OMG');
|
|
||||||
|
|
||||||
socket.emit('hello', 'world');
|
|
||||||
socket.on('hello', (data) => {
|
|
||||||
socket.broadcast.emit('hello', data);
|
|
||||||
});
|
|
||||||
|
|
||||||
socket.on('message', (data) => {
|
socket.on('message', (data) => {
|
||||||
console.log('message received', data);
|
console.log('message received', data);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user