title: How to access files in my public folder in node.js express
body: <p>I am trying to access files located in my <em>public</em> folder, using express. 
  My file structure looks like this </p>
  
  <pre><code>/app
   -app.js
   /routes
    -index.js
   /public
    /images
     /misc
     -background.jpg
    /css
      -style.css
  </code></pre>
  
  <p>My <em>app.js</em> is running on port <em>3000</em>,</p>
  
  <pre><code>app.use(express.static('app/public'));
  app.use(require('./routes/index'));
  </code></pre>
  
  <p>and <em>index.js</em> cannot find <em>background.jpg</em> or <em>style.css</em></p>
  
  <pre><code>router.get('/',function(req,res){
  res.send(`
  &lt;link rel="stylesheet" type="text/css"
    href="css/style.css"&gt;
  &lt;h1&gt;Welome&lt;/h1&gt;
  &lt;img
  src="/images/misc/background.jpg"
  style="height:300px;"/&gt;
  &lt;p&gt;some text&lt;/p&gt;`);
  });
  
  module.exports = router;
  </code></pre>
  
  <p>I am going by the docs so I have no idea why this is not working.</p>