import * as fs from 'fs'; import * as path from 'path'; import * as socketio from 'socket.io-client'; const socket = socketio.connect('https://localhost:4040', { ca: fs.readFileSync(path.join(__dirname, '../../server-test/ssl/cert.pem')).toString() }); socket.on('connect', () => { socket.emit('hello'); }); socket.on('exde', () => { console.log('got an exde :V'); });