Files
playbull/server/realtime.js
Mike 94b6cc3be9 Initial PlayBull release with Trilogy Hub integration.
Includes homelab deploy tooling, image position/zoom manifest persistence, and full trading/casino stack.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 08:31:36 +02:00

16 lines
430 B
JavaScript

import { Feed } from './db.js';
let io = null;
export function setIO(server) { io = server; }
export function getIO() { return io; }
export function broadcast(event, payload) {
if (io) io.emit(event, payload);
}
// Globaler Aktivitaets-Feed (Wins, Trades, Manipulationen) fuer alle sichtbar.
export function pushFeed(kind, text) {
Feed.add(kind, text);
broadcast('feed', { kind, text, ts: Date.now() });
}