title: Nodejs chat program 'io is not defined' error after https setup via letsencrypt
body: <p>I setup a nodejs chat program on my website.</p>
  
  <p>Then when I moved the website from http to https using letsencrypt, the chat program stopped working.</p>
  
  <p>Here are the server and client:<br>
  <a href="https://synodins.com/apps/chat/server.js" rel="nofollow noreferrer">https://synodins.com/apps/chat/server.js</a><br>
  <a href="https://synodins.com/apps/chat/client.html" rel="nofollow noreferrer">https://synodins.com/apps/chat/client.html</a><br>
  And to read the client script directly:<br>
  <a href="https://synodins.com/apps/chat/client.txt" rel="nofollow noreferrer">https://synodins.com/apps/chat/client.txt</a><br></p>
  
  <p>The problem is, as you can see in the client upon inspect element, is that i get error:<br>
  ReferenceError: io is not defined<br></p>
  
  <p>I already have searched for this error and found:<br>
  <a href="https://stackoverflow.com/questions/11995406/socket-io-referenceerror-io-is-not-defined">socket.io - ReferenceError: io is not defined</a><br>
  but I am already doing things the way he suggests in the answer.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>Can anybody see what the problem is?</p>