Includes homelab deploy tooling, image position/zoom manifest persistence, and full trading/casino stack. Co-authored-by: Cursor <cursoragent@cursor.com>
16 lines
430 B
JavaScript
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() });
|
|
}
|