title: Why can't I get to my javascript files from Expressjs/Nodejs?
body: <p>I'm starting to experiment with nodejs/expressjs/coffeescript and the jade view engine. </p>
  
  <p>I have the following setup which from what I can see from the examples that are around seems pretty standard.</p>
  
  <pre><code>    app = express.createServer().listen process.env.PORT
  
      app.configure -&gt;
          app.set 'views', __dirname + '/views'
          app.set 'view engine', 'jade'
          app.set 'view options', layout: true
          app.use express.bodyParser()
          app.use express.static(__dirname + '/public')
          app.use app.router
  
  
      app.get '/ekmHoliCal/index', (req, res) -&gt;
          res.render 'index'
  </code></pre>
  
  <p>My directory structure is as follows:</p>
  
  <pre><code>-- ekmHoliCal
    -- public
       --javascripts 
            client.js
    -- views
         index.jade
         layout.jade
  </code></pre>
  
  <p>The index file contains nothing but the the line:
      <strong>This is the index file</strong></p>
  
  <p>the layout.jade file contains:</p>
  
  <pre><code>!!! 5
  html(lang="en")
      head
          title Users
          script(type="text/javascript", src="http://code.jquery.com/jquery-1.6.4.js")
          script(type="text/javascript", src="/ekmholical/javascripts/client.js")
      body 
          div!= body 
  </code></pre>
  
  <p>When I navigate to localhost/ekmHoliCal/index I get served the index page as expected. However if I view source I see a link to to jquery :</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.js"&gt;
  </code></pre>
  
  <p>and if I click on that link sure enough I see the source of the jquery file. </p>
  
  <p>The index file source also contains a link to my client.js file as follows:</p>
  
  <pre><code>&lt;script type="text/javascript" src="/ekmholical/javascripts/simon.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>but when I click on that I get </p>
  
  <p><strong>Cannot GET /ekmholical/javascripts/client.js</strong></p>
  
  <p>I've seen this related question (<a href="https://stackoverflow.com/questions/5924072/express-js-cant-get-my-static-files-why">Express-js can&#39;t GET my static files, why?</a>) and can't see what I'm doing wrong</p>