title: can not read image from folder in node.js
body: <p>I have put images inside "/public/images" path. Now in the respose I am getting url as I wanted. But as soon as I paste that url to web browser, it says <strong>Cannot GET /public/images/food-1-xxhdpi.png</strong>. So should I write separate API to handle that?</p>
  
  <p>Main file app.js</p>
  
  <pre><code>var express = require('express');
  var mongoose = require('mongoose');
  var bodyParser = require('body-parser');
  var app = express();
  var PORT = 3000;
  var foodtrucklist = require('./controller/foodtrucklist.js');
  var foodtruck = require('./model/datafoodtruck');
  
  var db = mongoose.connect('mongodb://127.0.0.1:27017/quflip');
  
  mongoose.connection.once('connected', function() {
      console.log("Connected to database")
      foodtruck.save(function(err,foodtrucks){
          if (err) res.send(err);
      });
  });
  
  app.use(bodyParser.urlencoded({extended:true}));
  app.use(bodyParser.json());
  app.use(express.static(__dirname + '/public/images'));
  
  
  app.get('/foodtrucklist',foodtrucklist);
  
  app.listen(PORT,function() {
      console.log('express listining on port' + PORT);
  });
  </code></pre>