title: How to use Node.js to build pages that are a mix between static and dynamic content?
body: <p>All pages on my 5 page site should be output using a Node.js server.</p>
  
  <p>Most of the page content is static. At the bottom of each page, there is a bit of dynamic content.</p>
  
  <p>My node.js code currently looks like:</p>
  
  <pre><code>var http = require('http'); 
  
  http.createServer(function (request, response) {
  
      console.log('request starting...');
  
      response.writeHead(200, { 'Content-Type': 'text/html' });
  
      var html = '&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;head&gt;&lt;title&gt;My Title&lt;/title&gt;&lt;/head&gt;&lt;body&gt;';
      html += 'Some more static content';
      html += 'Some more static content';
      html += 'Some more static content';
      html += 'Some dynamic content';
      html += '&lt;/body&gt;&lt;/html&gt;';
  
      response.end(html, 'utf-8');
  
  }).listen(38316);
  </code></pre>
  
  <p>I'm sure there are numerous things wrong about this example. Please enlighten me!
  For example:</p>
  
  <ul>
  <li>How can I add static content to the
  page without storing it in a string as a variable value with += numerous times?</li>
  <li>What is the best practices way to build a small site in Node.js where all pages are a mix between static and dynamic content?</li>
  </ul>