how to use socket io in production
import * as io from 'socket.io-client'; // So far this works in localhost without any issues var socket = io('http://localhost:3000', { transports: ['websocket'] }); // For production does the below code works var socket = io('https://mydomainname', { transports: ['websocket'] });
Source: stackoverflow.com