Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
io.action('send event', { comment: 'Sends an event' }, (cb) => {
io.emit('event:sent', {
msg: 'You sent a custom event!'
})
cb('Sent event!')
})