title: Serving static files from Node.js
body: <p>I'm trying to serve static files from <code>Node.js</code> the only problem I'm having, is if I keep going into sub paths, like so:</p>
  
  <pre><code>localhost:3000/foo/bar/baz/quux
  </code></pre>
  
  <p>Then I have to step up the same amount of times, like this:</p>
  
  <pre><code>../../../../public/javascripts/whatever.js
  </code></pre>
  
  <p>As you can see that gets really annoying, is there a way to make Express v3 just know so that I can just do <code>/public/javascripts/whatever.js</code> instead of having to step up? Thanks in advance</p>
  
  <p>This is my current static middleware for Express`</p>
  
  <pre><code>app.use("/public", express.static(__dirname + '/public'));
  </code></pre>