I setup a nodejs chat program on my website.
Then when I moved the website from http to https using letsencrypt, the chat program stopped working.
Here are the server and client:
https://synodins.com/apps/chat/server.js
https://synodins.com/apps/chat/client.html
And to read the client script directly:
https://synodins.com/apps/chat/client.txt
The problem is, as you can see in the client upon inspect element, is that i get error:
ReferenceError: io is not defined
I already have searched for this error and found:
socket.io - ReferenceError: io is not defined
but I am already doing things the way he suggests in the answer.
I am not really sure what the problem is, although I suspect there is something wrong with the socket.io module loading in the client.
Interestingly, I can run the chat on my localhost without problems, but when I try to run it on the server I get this error.
Can anybody see what the problem is?