title: I can't use EJS layout using res.render()
body: <p>I've been trying to use express-ejs-layouts module.
  My when I try second route, browser finds my JS and CSS resource file under my second EJS files -that was written by me into second route function.</p>
  
  <p><strong>What should I do?</strong></p>
  
  <p>My Layout appears properly with my first route process like the following.</p>
  
  <p>my first route;</p>
  
  <pre><code>app.get('/', function(req, res) {
          res.render('home/index');
  });
  </code></pre>
  
  <p>my layout.ejs file;</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="tr"&gt;
  &lt;head&gt;
      &lt;link rel="stylesheet" href="bootstrap/css/bootstrap.css"&gt;
      &lt;link rel="stylesheet" href="css/styles.css"&gt;    
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;% include navbar %&gt;
  
      &lt;%- body %&gt; 
  
      &lt;script src="js/jquery.js"&gt;&lt;/script&gt;
      &lt;script src="bootstrap/js/bootstrap.js"&gt;&lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>So far everything is good.  My resource files (css and js) linked and I can see my <em>home/index.ejs</em> properly. And then I try my second route like the following;</p>
  
  <p>my second route; </p>
  
  <pre><code>app.get('/user/:id', function(req, res) {
       res.render('user/index');
  });
  </code></pre>
  
  <p>My browser console gives the below errors;</p>
  
  <pre><code>Failed to load resource: the server responded with a status of 404
  (Not Found) http://localhost:1337/user/bootstrap/css/bootstrap.css
  
  Failed to load resource: the server responded with a status of 404
  (Not Found) http://localhost:1337/user/css/styles.css
  
  Failed to load resource: the server responded with a status of 404
  (Not Found) http://localhost:1337/user/js/jquery.js
  
  Failed to load resource: the server responded with a status of 404
  (Not Found) http://localhost:1337/user/bootstrap/js/bootstrap.js
  </code></pre>