https://github.com/websockets/ws
yarn add ws
import WebSocket from 'ws';
const ws = new WebSocket('ws://www.host.com/path');
ws.on('open', function open() {
ws.send('something');
});
ws.on('message', function incoming(message) {
console.log('received: %s', message);
});