title: Express.js "path must be absolute or specify root to res.sendFile" error
body: <p>NOTE : This is NOT a duplicate question, I've already tried other answers to similar questions.</p>
  
  <p>I'm trying to render html files (Angular) but I'm having an issue.
  This works.</p>
  
  <pre><code>app.get('/randomlink', function(req, res) {
      res.sendFile( __dirname + "/views/" + "test2.html" );
  });
  </code></pre>
  
  <p>But I don't want to copy and paste dirname thingy over and over, so I tried this in order to not to be repetitive with urls:</p>
  
  <pre><code>app.use(express.static(path.join(__dirname, 'public')));
  app.use(express.static(path.join(__dirname, 'views')));
  
  app.get('/randomlink', function(req, res) {
       res.sendFile('test2.html'); // test2.html exists in the views folder
   });
  </code></pre>
  
  <p>Here's the error.</p>
  
  <p>My express version is 4.13</p>
  
  <blockquote>
    <p>path must be absolute or specify root to res.sendFile</p>
  </blockquote>