title: Using Route of express node.js but express.Router getting as undefined
body: <p>My code of router from default routes/index</p>
  
  <pre><code>/* GET home page. */
  exports.index = function(req, res){
    res.render('user', { title: 'Abcd' });
  };
  
  var express = require('express');
  
  var router = express.Router();
  
  /* GET home page. */
  router.get('/', function(req, res) {
      res.render('index', { title: 'Express' });
  });
  
  router.get('/helloworld', function(req, res) {
      res.render('helloworld', { title: 'Hello, World!' })
  });
  
  module.exports = router;
  </code></pre>
  
  <p>getting error as can not call method get of undefined.I am new in node js please anyone help me.</p>