use socket io with https code example
Example: socket io script
<script src="/socket.io/socket.io.js"></script>
<script>
const socket = io();
</script>
<script src="/socket.io/socket.io.js"></script>
<script>
const socket = io();
</script>