title: How do I serve partially dynamic HTML pages with Express?
body: <p>Alright, here's my issue: I have an HTML page I am quite happy with, but I wish to make it dynamic. I am using Node with Express, and I was wondering if there was any way to modify and then render plain HTML. I will not be using Jade or any other template engines.</p>
  
  <p>My server.js:</p>
  
  <pre><code>var http = require('http');
  var express = require('express');
  var app = express()
  
  var port = 3000;
  var api_router = express.Router();
  
  ....
  
  api_router.route('/webm/test/')
  .get(function(req, res){
      res.sendFile(__dirname + "/test.html")
  })
  
  app.use('/api/', api_router);
  app.listen(port);
  console.log("NodeJS Backend API running.");
  </code></pre>
  
  <p>Currently this does not work (no templating engine for HTML found). It also does not fulfill my needs: I wish to set the "src='blah.webm'" in a  tag depending on the GET req. </p>
  
  <p>This is my page I wish to modify: </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Index&lt;/title&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
          &lt;link rel="stylesheet" type="text/css" href="../stylesheet.css"&gt;
          &lt;link rel="stylesheet" type="text/css" href="stylesheet.css"&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
          &lt;div id="header"&gt;
              &lt;a href="../index.html"&gt;&lt;p&gt;../&lt;/p&gt;&lt;/a&gt;
              &lt;p&gt;TrentV.net : Trent VanSlyke&lt;/p&gt;
          &lt;/div&gt;
          &lt;div class="container" style="display: flex"&gt;
              &lt;video id="player" src="CUSTOMIZE ME" controls&gt;&lt;/video&gt;
              &lt;div id="related"&gt;
  
              &lt;/div&gt;
  
              &lt;script src="webm.js" type="text/javascript"&gt;&lt;/script&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>