title: How to serve an image using nodejs
body: <p>I have a logo that is residing at the <code>public/images/logo.gif</code>. Here is my nodejs code.</p>
  <pre><code>http.createServer(function(req, res){
    res.writeHead(200, {'Content-Type': 'text/plain' });
    res.end('Hello World \n');
  }).listen(8080, '127.0.0.1');
  </code></pre>
  <p>It works but when I request for <code>localhost:8080/logo.gif</code> then I obviously don't get the logo.</p>
  <p>What changes I need to do to serve an image.</p>