cara menggunakan socket io dalam produksi

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'] });
Restu Wahyu Saputra