A Node.js/Express server with WebSocket integration for sending real-time alerts to specific rooms.
- REST API for receiving alert requests
- WebSocket integration for real-time notifications
- Request validation system
- Room-based message targeting
npm install
Create a .env
file with:
PORT=3000
ACCEPT=application/json
SECRET_KEY=your_secret_here
// Start server
npm start
Send a message to a specific room:
{
"message": "Server going down!",
"roomId": "server-room",
"secretKey": "your_secret_here"
}
Headers: