package com.example.demo.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
const { WebSocketServer } = require('ws');
const crypto = require('crypto');
const wss = new WebSocketServer({ port: 8080 });
function broadcast(payload, except) {