title: how to correctly reference a js file in a ejs file in Angular
body: <p>This is my project structure:</p>
  
  <p>public
  -js
  --angular.min.js
  --angularApp.js
  templates
  -views
  --index.ejs</p>
  
  <p>This is my index.ejs file:</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;My Angular app!&lt;/title&gt;
          &lt;script type='text/javascript' src="../../public/js/angular.min.js"&gt;&lt;/script&gt;
  
      &lt;/head&gt;
  
      &lt;body ng-app="flapperNews" ng-controller="MainCtrl"&gt;
          &lt;div&gt;
              {{test}}
          &lt;/div&gt;
          &lt;script type='text/javascript' src="../../public/js/angularApp.js"&gt;&lt;/script&gt;
      &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>When I run this I get a 404 not found error on the js files.</p>
  
  <p>I tried adding this to middleware.js in the routes folder:</p>
  
  <pre><code>app.use("/public/js/angularApp.js", express.static(__dirname + '/public/js/angularApp.js'));
  </code></pre>
  
  <p>But this didnt work, I also tried using this path:</p>
  
  <pre><code>/public/js/
  </code></pre>
  
  <p>But also didn't work.</p>
  
  <p>How can I correctly reference a Javascript file in a ejs file?</p>