title: EJS not rendering
body: <p>I simply make a little templating system with EJS, Express.js on node.js but the render is a bit wtf...</p>
  
  <p><a href="https://i.stack.imgur.com/L63dM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L63dM.jpg" alt="here the render"></a></p>
  
  <p>And here the code of my server.js :</p>
  
  <pre><code>var fs = require('fs');
  var http = require('http');
  var https = require('https');
  //var privateKey  = fs.readFileSync('sslcert/server.key', 'utf8');
  //var certificate = fs.readFileSync('sslcert/server.crt', 'utf8');
  
  //var credentials = {key: privateKey, cert: certificate};
  var express = require('express');
  var app = express();
  
  app.set('view engine', 'ejs');
  
  //Here the config of page
  app.get('/', function(req, res){
      //Accueil -&gt; redirection vers un chat aléatoire
              res.setHeader('Content-Type', 'text/plain');
          res.status(500).send('Test !');
  });
  
  app.get('/about', function(req, res){
              res.setHeader('Content-Type', 'text/plain');
          res.status(500).send('Test !');
  });
  
  app.get('/auth/login', function(req,res){
              res.setHeader('Content-Type', 'text/plain');
          res.status(500).send('Test !');
  });
  
  
  app.get('/auth/register', function(req,res){
              res.setHeader('Content-Type', 'text/plain');
          res.status(500).send('Test !');
  });
  
  app.get('/chat', function(req,res){
      res.setHeader('Content-Type', 'text/plain');
      res.render('redirect.ejs', {});
  })
  
  app.get('/chat/:chatnum', function(req,res){
      if(parseInt(req.params.chatnum, 10) &lt; 101){
          res.setHeader('Content-Type', 'text/plain');
          res.status(500).send('Test !' + req.params.chatnum);
      }
      else {
          res.setHeader('Content-Type', 'text/plain');
          res.status(404).send('Page introuvable !!');
      }        
  });
  
  app.use(function(req, res, next){
      res.setHeader('Content-Type', 'text/plain');
      res.status(404).send('Page introuvable !');
  });
  
  var httpServer = http.createServer(app);
  //var httpsServer = https.createServer(credentials, app);
  
  httpServer.listen(8080);
  //httpsServer.listen(8443);
  </code></pre>
  
  <p>(i've disabled https currently)</p>
  
  <p>So if someone know why it is not rendering html as html but as text...</p>
  
  <p>Thanks in advance...</p>
  
  <p>EDIT : P.S. you can see the template code in the browser as it is in the file redirecting.ejs
  EDIT 2 : adding code format for redirect.ejs</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
      &lt;head&gt;
  
          &lt;title&gt;Redirecting...&lt;/title&gt;
  
      &lt;/head&gt;
  
      &lt;body&gt;
  
      &lt;h1 style="text-align: center"&gt;Redirecting...&lt;/h1&gt;
  
      &lt;script&gt;window.location.href = "/ + " (Math.random().trunc() * 100) + 1&lt;/script&gt;    
  
      &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>