title: express.js not serving my image
body: <p>I don't understand whats going wrong here. </p>
  
  <p>directory structure:</p>
  
  <pre><code>app/server.js
  app/public/index.html
  app/public/js/main.js
  app/public/img/car.png 
  </code></pre>
  
  <p>server.js</p>
  
  <pre><code>var fs = require('fs') ,express = require('express'),
  app = express.createServer();
  
  app.use(express.static(__dirname + "/public"));
  
  app.get('/', function(req, res){
      fs.readFile(__dirname + '/public/index.html', 'utf8', function(err, text){
          res.send(text);
      });
  });
  
  app.listen(8080, function(){
      console.log('Server listening on %d', app.address().port);  
  });
  </code></pre>
  
  <p>main.js</p>
  
  <pre><code>var marker = new google.maps.Marker({
          map:map,
          position:coords,
          icon: 'img/car.png'
      });
  </code></pre>
  
  <p><strong>erroroutput:</strong></p>
  
  <pre><code>Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/img/car.png 
  </code></pre>
  
  <p>All my css files and js files load with no problem.
  What am I doing wrong?</p>
  
  <p><strong>UPDATE</strong>
  This was due to the file being named car.png.png 
  When browsing in windows, fileextensions were not visible so I was fooled into thinking the name was really car.png 
  Lesson learned!</p>