Fails to look up view in Express <p>This is the structure of my project. </p> <p>app <br> &nbsp; -controllers <br> &nbsp; &nbsp; &nbsp; index.server.controller.js <br> &nbsp; -models <br> &nbsp; -routes <br> &nbsp;&nbsp;&nbsp;&nbsp; index.server.routes.js <br> &nbsp;-views <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;index.ejs <br> config <br> &nbsp; -express.js <br></p> <p>I set the view directory in my express.js file:</p> <pre><code>app.set('views', '../app/views'); app.set('view engine', 'ejs'); </code></pre> <p>And this is in my controller file:</p> <pre><code>exports.render = function(req,res) { res.render('index' , { title: 'welcome to this page' }) }; </code></pre> <p>Whenever i open localhost i get </p> <p>Error: Failed to lookup view "index" in views directory "../app/views/"</p>