title: Express call GET method within route from another route
body: <p>I have multiple routes. How can I get the data from the user's route (GET method), by calling it within the GET method of the group's route? What is the best way of doing this?</p>
  <p>My app.js looks like this:</p>
  <pre class="lang-js prettyprint-override"><code>var express = require('express');
  
  var routes = require('./routes/index');
  var users = require('./routes/users');
  var groups = require('./routes/groups');
  
  var app = express();
  
  app.use('/', routes);
  app.use('/users', users);
  app.use('/groups', groups);
  
  module.exports = app;
  app.listen(3000);
  </code></pre>
  <p>Then I have another file routes/users.js:</p>
  <pre class="lang-js prettyprint-override"><code>var express = require('express');
  var router = express.Router();
  
  /* GET users listing. */
  router.get('/', function(req, res, next) {
    res.send('GET ON THE users!');
  });
  
  module.exports = router;
  </code></pre>
  <p>And another route routes/groups.js:</p>
  <pre class="lang-js prettyprint-override"><code>var express = require('express');
  var router = express.Router();
  var otherRouter = require('./users')
  
  /* GET groups listing. */
  router.get('/', function(req, res, next) {
  
      // call the get on users and retrieve all data from that request
  
      res.send('GET for the groups');
  });
  
  module.exports = router;
  </code></pre>