ejs/html not finding external js file (node js)
<pre><code>--public/javascripts/myscript.js

--views/index.ejs
</code></pre>

<p>No matter what I do, or what variation I use (ie declaring including <code>type="text/javascript"</code>) it wont find my external js file. I am using <em>node js</em> and I was told I may have to do something with routing, but that doesn't seem to be working either.</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;&lt;%= title %&gt;&lt;/title&gt;
   &lt;!-- &lt;link rel='stylesheet' href='/stylesheets/style.css' /&gt;--&gt;

  &lt;/head&gt;
  &lt;body&gt;

  &lt;%include templates/header.ejs %&gt;

  &lt;script type="text/javascript" src=".../public/javascripts/myscript.js"&gt; &lt;/script&gt;

  &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I understand using routing in other <code>.js</code> files but not importing into html.</p>

<p>Also is there a better/neater was of doing this?</p>