title: Cannot import scripts Node.js server
body: <p>I'm creating an http server with node that reads a simple html file. This html file imports some scripts that are located in my computer. Node cannot load this scripts. Why?</p>
  
  <pre><code>    var http = require('http');
  var io = require('socket.io').listen(2210);
  var fs = require('fs');
  
  http.createServer(function(req, res){
      fs.readFile("./index.html", function(err, data){
          if (err){
              res.writeHead(500);
              res.end("Error loading index.html");
          }
              res.writeHead(200, {"Content-Type":"text/html"});
              res.end(data, 'utf-8');
      });
  }).listen(2211);
  
  io.sockets.on('connection', function(socket){
  
  });
  </code></pre>
  
  <p>And here is the html file:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt; 
  &lt;html&gt; 
      &lt;head&gt; 
      &lt;title&gt;ASGEAWER&lt;/title&gt; 
    &lt;meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1"&gt;
      &lt;link rel="stylesheet" href="jquery-mobile/jquery.mobile.css" /&gt;
      &lt;link rel="stylesheet" href="jquery.mobile.splitview.css" /&gt;
    &lt;link rel="stylesheet"  href="jquery.mobile.grids.collapsible.css" /&gt;
    &lt;script type="text/javascript" src="jquery-1.7.1.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="jquery.mobile.splitview.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="jquery.mobile.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="servernode.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="interaction.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
      $(document).on("ready",inici);
    &lt;/script&gt;
  &lt;/head&gt; 
  
    &lt;body&gt; 
  
      &lt;div data-role="panel" data-id="menu" data-hash="crumbs" data-context="a#default"&gt;
  
        &lt;!-- Start of first page --&gt;
        &lt;div data-role="page" id="main" data-hash="false"&gt;
  
          &lt;div data-role="header" data-position="fixed"&gt;
              &lt;h1&gt;Categoria&lt;/h1&gt;
          &lt;/div&gt;&lt;!-- /header --&gt;
  
          &lt;div data-role="content"&gt;
            &lt;ul data-role="listview"&gt;
  
            &lt;/ul&gt;
          &lt;/div&gt;
  
        &lt;/div&gt;&lt;!-- /page --&gt;
  
      &lt;/div&gt;&lt;!-- panel menu --&gt;
  
  
  
  
  
  
      &lt;div data-role="panel" data-id="main"&gt;
        &lt;!-- Start of 6th page --&gt;
        &lt;div data-role="page" id="aboutsv"&gt;
  
          &lt;div data-role="header" data-theme="b"&gt;
            &lt;h1&gt;Productos&lt;/h1&gt;
          &lt;/div&gt;&lt;!-- /header --&gt;
  
          &lt;div data-role="content"&gt; 
          &lt;/div&gt;&lt;!-- /content --&gt;
        &lt;/div&gt;&lt;!-- /page --&gt;
  
      &lt;/div&gt;&lt;!-- panel main --&gt;
  
  
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And chrome gives me those errors:</p>
  
  <pre><code>Uncaught SyntaxError: Unexpected token &lt; jquery-1.7.1.js:1
  Uncaught SyntaxError: Unexpected token &lt; jquery.mobile.splitview.js:1
  Uncaught SyntaxError: Unexpected token &lt; jquery.mobile.js:1
  Uncaught SyntaxError: Unexpected token &lt; servernode.js:1
  Uncaught SyntaxError: Unexpected token &lt; interaction.js:1
  Uncaught ReferenceError: $ is not defined 
  </code></pre>