title: how to include an ejs file in another ejs file?
body: <p>I can't include <code>footer.ejs</code> inside <code>home.ejs</code></p>
  
  <p><strong>app.js</strong>:</p>
  
  <pre><code>var express = require('express');
  var app = express();
  
  app.set("view engine", "ejs")
  
  app.get('/', function(req, res){
      res.render('home')
  });
  </code></pre>
  
  <p><strong>view/home.ejs</strong>:</p>
  
  <pre><code>&lt;h1&gt;Welcome&lt;/h1&gt;
  
  &lt;% include partials/footer.ejs %&gt;
  </code></pre>
  
  <p><strong>view/partials/footer.ejs</strong></p>
  
  <pre><code>&lt;p&gt;End&lt;/p&gt;
  </code></pre>
  
  <p>this is the error I get when i try to reach <code>home</code>:</p>
  
  <blockquote>
    <p>SyntaxError: Unexpected identifier in /home/ubuntu/Documents/moreExpress/EJSdemo/views/home.ejs while compiling ejs</p>
    
    <blockquote>
      <p>If the above error is not helpful, you may want to try EJS-Lint:
      <a href="https://github.com/RyanZim/EJS-Lint" rel="nofollow noreferrer">https://github.com/RyanZim/EJS-Lint</a>
      Or, if you meant to create an async function, pass <code>async: true</code> as an option.
          at new Function ()
          at Template.compile (/home/ubuntu/Documents/moreExpress/EJSdemo/node_modules/ejs/lib/ejs.js:626:12)
          at Object.compile (/home/ubuntu/Documents/moreExpress/EJSdemo/node_modules/ejs/lib/ejs.js:366:16)
          at handleCache (/home/ubuntu/Documents/moreExpress/EJSdemo/node_modules/ejs/lib/ejs.js:215:18)
          at tryHandleCache (/home/ubuntu/Documents/moreExpress/EJSdemo/node_modules/ejs/lib/ejs.js:254:16)
          at View.exports.renderFile [as engine] (/home/ubuntu/Documents/moreExpress/EJSdemo/node_modules/ejs/lib/ejs.js:459:10)
          at View.render (/home/ubuntu/Documents/moreExpress/EJSdemo/node_modules/express/lib/view.js:135:8)
          at tryRender (/home/ubuntu/Documents/moreExpress/EJSdemo/node_modules/express/lib/application.js:640:10)
          at Function.render (/home/ubuntu/Documents/moreExpress/EJSdemo/node_modules/express/lib/application.js:592:3)
          at ServerResponse.render (/home/ubuntu/Documents/moreExpress/EJSdemo/node_modules/express/lib/response.js:1012:7)</p>
    </blockquote>
  </blockquote>