We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to group connections by rooms and send events to this group. Something like:
let sseExpress = require('./sse-express'); //... app.get('/join-room', function(req, res) { res.sse.join('room-name'); // joins connection to room sseExpress.room.join('room-name', clientId); }); app.get('/leave-room', sseExpress.room, function(req, res) { sseExpress.room.leave('room-name', clientId); // leaves connection to room }); app.get('/messages', sseExpress(), function(req, res) { res.sse.toRoom('room-name', clientId, { event: 'message', data: { text: req.body.message, userId: req.body.userId }, id: Date.now() + req.body.userId }) });
The text was updated successfully, but these errors were encountered:
I'd suggest putting it in separate library extending this one, core library should do one thing and do it well
Sorry, something went wrong.
No branches or pull requests
Add ability to group connections by rooms and send events to this group. Something like:
The text was updated successfully, but these errors were encountered: