title: EJS does not render value returned from res.render
body: <p>I'm getting the page redirects correctly however when I'm going to list this result in the front-end the value is not shown just the command of the EJS in my front-end view.<a href="https://i.stack.imgur.com/I7WI9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/I7WI9.png" alt="enter image description here"></a></p>
  
  <p>I've tried to pass the output value in several different ways but none worked...</p>
  
  <p>This my root files.</p>
  
  <p><a href="https://i.stack.imgur.com/tIQcB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tIQcB.png" alt="enter image description here"></a></p>
  
  <p>My index.js</p>
  
  <pre><code>var http = require('http');
  var express    = require('express'),
      mongoose = require('mongoose'),
      ejs = require('ejs'),
      nunjucks   = require('nunjucks'),
      path = require('path'),
      mysql      = require('mysql'),
      bodyParser = require('body-parser'),
      methodOverride = require('method-override'),
      logger = require('morgan');
  var errorHandler = require('errorhandler');
  
  app.use(logger('dev'));
  app.use(bodyParser());
  app.use(bodyParser.urlencoded({ extended: true }));
  app.use(bodyParser.json());
  
  import config from "./config/config";
  import mongodb from "./config/mongodb";
  import passport from "./config/passport";
  import * as setup from "./middleware/setup";
  
  import app from "./config/express";
  import routes from "./routes";
  
  import User from './models/User';
  
  export function start() {
  
    return new Promise((resolve, reject) =&gt; {
  
      mongodb().then((db) =&gt; {
  
        let server = http.createServer(app);
  
        // save references
        app.db = db;
        app.server = server;
        app.config = config;
  
        // init passport
        passport(app);
  
        // register setup check middleware
        app.use(setup.check);
  
        // setup routes
        routes(app);
  
        // start server
        app.server.listen(config.server.port, (err) =&gt; {
          if (err) {
            return reject(err);
          }
          resolve(app);
        });
      }, reject);
    });
  };
  
  app.set('views', __dirname + '/templates');
  app.engine('html', require('ejs').renderFile);
  
  var api = express.Router();
  app.use('/', api);
  
  api.get('/test-ejs', function (req, res) {
    res.render('test.html', { title: 'Return sucess!' });
  });
  
  api.get("/templates",function(req, res){
    var path = __dirname + '/templates/';
    res.sendFile(path + "index.html");
  });
  </code></pre>
  
  <p>My HTML template test.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;  
  &lt;html lang="en"&gt;  
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;Test EJS&lt;/title&gt;
      &lt;meta name="description" content=""&gt;
      &lt;meta name="author" content=""&gt;
  
      &lt;!-- HTML5 shim, for IE6-8 support of HTML elements --&gt;
      &lt;!--[if lt IE 9]&gt;
        &lt;script src="http://html5shim.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
      &lt;![endif]--&gt;
  
      &lt;!-- styles --&gt;
      &lt;link href="stylesheets/style.css" rel="stylesheet"&gt;
  
    &lt;/head&gt;
    &lt;body&gt;
      &lt;%= title %&gt;
    &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>
  
  <p>Thank for helping me! xD</p>