title: Failed to load resource: the server responded with a status of 404 (Not Found) https://websitename.herokuapp.com/js/bootstrap.js
body: <p>I'm running a node.js server on heroku using the express.js framework.</p>
  
  <p>Here is what my server looks like:</p>
  
  <pre><code>var express = require('express');
  var app = express();
  
  app.use(express.static(__dirname + '/static'));
  var port = process.env.PORT || 8000;
  
  app.listen(port);
  </code></pre>
  
  <p>My index.html file has the following javascript links:</p>
  
  <pre><code>&lt;script src="/js/chartview.js"&gt;&lt;/script&gt;
  &lt;script src="/js/bootstrap.js"&gt;&lt;/script&gt;
  &lt;script src="/js/bootstrap-select.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>My directory system looks like this:</p>
  
  <pre><code>server.js
  /static
      -index.html
      -/js
          -bootstrap.js
          -bootstrap-select.js
          -chartview.js
      -/css
          -bootstrap.css
          -bootstrap-select.css
          -styles.css
  </code></pre>
  
  <p>Chrome displays my html page with the appropriate css styles but the console says:</p>
  
  <pre><code>Failed to load resource: the server responded with a status of 404 (Not Found)   https://websitename.herokuapp.com/js/chartview.js
  Failed to load resource: the server responded with a status of 404 (Not Found)   https://websitename.herokuapp.com/js/bootstrap.js
  Failed to load resource: the server responded with a status of 404 (Not Found)   https://websitename.herokuapp.com/js/bootstrap-select.js
  </code></pre>
  
  <p>It loads properly when I change my index.html  tags to look like this:</p>
  
  <pre><code>&lt;script src="chartview.js"&gt;&lt;/script&gt;
  &lt;script src="bootstrap.js"&gt;&lt;/script&gt;
  &lt;script src="bootstrap-select.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>And I change my directory systems to look like this:</p>
  
  <pre><code>server.js
  /static
      -index.html
      -bootstrap.js
      -bootstrap-select.js
      -chartview.js
      -/css
          -bootstrap.css
          -bootstrap-select.css
          -styles.css
  </code></pre>
  
  <p>This is not Ideal, as I would like to have a /js folder.</p>
  
  <p>Any suggestions will be greatly appreciated!</p>