https://github.com/websockets/ws

    1. yarn add ws
    2. import WebSocket from 'ws';
    3. const ws = new WebSocket('ws://www.host.com/path');
    4. ws.on('open', function open() {
    5. ws.send('something');
    6. });
    7. ws.on('message', function incoming(message) {
    8. console.log('received: %s', message);
    9. });