title: Including files with HTML in Node.js
body: <p>I can't seem to figure out how to include a file using Node.js. All of the other questions seem to discuss including other JS files, but I'm looking for the equivalent of a PHP include (files that can contain HTML content).</p>
  
  <p>Usually in PHP, my view files like this:</p>
  
  <pre><code>...stuff
  
  &lt;?php include 'header.php'; ?&gt;
  &lt;?php include 'nav.php'; ?&gt;
  
  ... more stuff
  
  &lt;?php include 'footer.php'; ?&gt;
  </code></pre>
  
  <p>And for example in <code>nav.php</code> I have:</p>
  
  <pre><code>&lt;nav role=navigation&gt;
  
      &lt;ul&gt;
          &lt;!-- links --&gt;
      &lt;/ul&gt;
  
  &lt;/nav&gt;
  </code></pre>
  
  <p>Is there similar functionality in Node or do I have to change my way of developing web applications? I am using the Express framework if that helps.</p>
  
  <p>A short, working example would be highly appreciated.</p>