title: how to serve static file in node.js?
body: <p>in my app user can upload images to server,and i put the uploaded file in upload folder like this</p>
  
  <ul>
  <li><p>public</p></li>
  <li><p>upload</p></li>
  </ul>
  
  <p>but when i serve the </p>
  
  <pre><code>&lt;img src='upload/image.jpg'/&gt;
  </code></pre>
  
  <p>there is a 404 error.</p>
  
  <p>i use express and use the</p>
  
  <pre><code>app.use(express.static(__dirname + '/public'));
  </code></pre>
  
  <p>does it mean i have to put all the uploaded in the public folder, what if there is so many images that the hard drive can not hold, can't i put the rest in a another server?</p>