title: Express app doesn't find node_modules folder to load scripts from
body: <p>I'm rather new to how webservers behave in general, so I have a few questions I hope someone can help me with.
  It would also be nice if anyone could point me to an article or some documentation about the following topics.</p>
  
  <p>Basically I'm trying to develop a webapp using Angular2, Expressjs and obviously node.js.</p>
  
  <p>I have already successfully developed some basic Angular2 apps without a backend attached to it, which worked fine.
  However, now I'm trying to send the index.html file (which contains a tag referring to an Angular component) to the browser from my server.</p>
  
  <pre><code>app.get('/test', function(req, res) {
      res.sendfile('index.html');
  });
  </code></pre>
  
  <p>You can find the html here: <a href="http://pastebin.com/utMHk8Pe" rel="nofollow">http://pastebin.com/utMHk8Pe</a></p>
  
  <p>However, even though the node_modules package is on the same hierarchic level as both server.js and index.html, going to localhost:8080/test gives me a 404 for the node_modules script files in my html header.</p>
  
  <p><strong>Q1: Why doesn't my server find the node_modules folder?</strong></p>
  
  <p>Now, when I run my index.html file through following link, <a href="http://localhost:54720/testapp/index.html" rel="nofollow">http://localhost:54720/testapp/index.html</a>, everything works just fine.
  Somehow it finds the node_modules at port 54720 but not 8080 (which is the port I made the express app listen on).</p>
  
  <p><strong>Q2: Why can't my server find the node_modules folder at the port I make it listen on?</strong></p>
  
  <p>As I've already said, I'm really new to node.js and webservers in general.
  I'd be very grateful for any help!
  Even linking me to an article which could be helpful would help me tons, since I can't really find anything since I don't know what to Google for.</p>