Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor() {
const primus = Primus.connect();
primus.plugin('emit', primusEmit);
primus.on('open', function open() {
console.log('Connection opened');
});
if(process.env.NODE_ENV === 'development') {
primus.on('data', function message(data) {
console.log('Socket:', data);
});
}
primus.on('info', data => {
console.log('info:', data);
});