title: node.js Socket io "Reference error io is not defined"
body: <p>I'm working on a chat program, I'm still in the beginning of making it but when I try to connect to the server from the console on google chrome it says  a reference error io is not defined.</p>
  
  <p>client</p>
  
  <pre><code>&lt;!DOCTYPE html&gt; 
  &lt;html&gt;
  &lt;head&gt;
      &lt;link rel="stylesheet" type="text/css" href="stylesheet.css"&gt;
      &lt;title&gt;Chat&lt;/title&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
      &lt;div class="chat"&gt;
          &lt;input type="text" class="chat-name" placeholder="Enter your name"&gt;
          &lt;div class="chat-messages"&gt;
              &lt;div class="chat-message"&gt;
  
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;textarea placeholder="type your message" class="chat-textarea"&gt;&lt;/textarea&gt;
          &lt;div class="chat-status"&gt;Status: &lt;span&gt;Idle&lt;/span&gt;&lt;/div&gt;
      &lt;/div&gt;
  
  
      &lt;script&gt;src="http://localhost:8080/socket.io/socket.io.js"&lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>server.js</p>
  
  <pre><code>var mongo = require('mongodb').MongoClient,
  client = require('socket.io').listen(8080);
  console.log("Server is running on port 8080");
  </code></pre>