forked from syntaxbullet/AuroraBot-discord
feat: implement real-time dashboard updates via WebSockets
This commit is contained in:
16
shared/lib/events.ts
Normal file
16
shared/lib/events.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { EventEmitter } from "node:events";
|
||||
|
||||
/**
|
||||
* Global system event bus for cross-module communication.
|
||||
* Used primarily for real-time dashboard updates.
|
||||
*/
|
||||
class SystemEventEmitter extends EventEmitter { }
|
||||
|
||||
export const systemEvents = new SystemEventEmitter();
|
||||
|
||||
export const EVENTS = {
|
||||
DASHBOARD: {
|
||||
STATS_UPDATE: "dashboard:stats_update",
|
||||
NEW_EVENT: "dashboard:new_event",
|
||||
}
|
||||
} as const;
|
||||
Reference in New Issue
Block a user