title: NodeJS failing to find routes
body: <p>Updated <code>Server.js</code> code:</p>
  
  <p>/Server.js </p>
  
  <pre><code>var express = require('express');
  
  var app = express();
  var bodyParser = require('body-parser');
  
  app.set('view engine', 'vash');
  app.set('views', path.join( __dirname, '/views') );
  
  app.use(express.static(__dirname + "/public"));
  app.set('views', path.join(__dirname, 'views'));
  
  var indexRoutes = require('./routes/index')
  app.use('/', indexRoutes);
  
  app.use(bodyParser.json()); 
  
  app.listen(3000);
  console.log("yep &gt;&gt;&gt; Server running on port 3000");
  </code></pre>
  
  <p>I'm still getting the same error not found</p>
  
  <p><strong>END UPDATE</strong></p>
  
  <p>I'm trying to setup routes in nodejs and its able to display the index.html page but when I click on about link I get the below error:
  error:</p>
  
  <blockquote>
    <p>Error: Failed to lookup view "about" in views directory
    "c:\nodejs\views"    at EventEmitter.app.render
    (c:\nodejs\node_modules\express\lib\application.js:519:17)    at
    ServerResponse.res.render
    (c:\nodejs\node_modules\express\lib\response.js:933:7)    at
    exports.about (c:\nodejs\routes\index.js:11:9)    at Layer.handle [as
    handle_request]
    (c:\nodejs\node_modules\express\lib\router\layer.js:82:5)    at next
    (c:\nodejs\node_modules\express\lib\router\route.js:110:13)    at
    Route.dispatch
    (c:\nodejs\node_modules\express\lib\router\route.js:91:3)    at
    Layer.handle [as handle_request]
    (c:\nodejs\node_modules\express\lib\router\layer.js:82:5)    at
    c:\nodejs\node_modules\express\lib\router\index.js:267:22    at
    Function.proto.process_params
    (c:\nodejs\node_modules\express\lib\router\index.js:321:12)    at next
    (c:\nodejs\node_modules\express\lib\router\index.js:261:10)</p>
  </blockquote>
  
  <p>/Server.js </p>
  
  <pre><code>var express = require('express');
  //route
  var routes = require('./routes');
  var path = require('path');
  
  var app = express();
  var bodyParser = require('body-parser');
  
  app.use(express.static(__dirname + "/public"));
  app.set('views', path.join(__dirname, 'views'));
  
  app.set('view engine', 'vash');
  
  app.get('/', routes.index);
  app.get('/about', routes.about);
  app.get('/contact', routes.contact);
  app.use(bodyParser.json()); 
  app.listen(3000);
  console.log("yep &gt;&gt;&gt; Server running on port 3000");
  </code></pre>
  
  <p>/routes/index.js</p>
  
  <pre><code>exports.index = function (req, res) {
      res.render('index', { title: 'Express', year: new Date().getFullYear() });
  };
  
  exports.about = function (req, res) {
      res.render('about', { title: 'About', year: new Date().getFullYear(), message: 'Your application description page.' });
  };
  
  exports.contact = function (req, res) {
      res.render('contact', { title: 'Contact', year: new Date().getFullYear(), message: 'Your contact page.' });
  };
  </code></pre>
  
  <p>here is the file structure:</p>
  
  <p><img src="https://i.stack.imgur.com/75CWk.png" alt="enter image description here"></p>