title: GET and POST request at the same time in NODE
body: <p>I have a search page and I need to send an array which tell me that what is user looking for like:<br>
  { Model: 'Jeans', Color: 'BLUE} </p>
  
  <p>and I should have a GET request to receive data from database.</p>
  
  <p>Can I have both Get and post request at the same time?
  Do you suggest to have one function for both or one function for each? if latter then How can I pass data between functions in Express.js?</p>
  
  <pre><code> app.route('/alls/:issuename')
      .get(alls.list)
      .post(alls.list2);
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>exports.list = function(req, res) {
      mongoose.model(var1).find({ color: var2 }).exec(function(err, alls){
          res.jsonp(alls);
      }); 
  };
  
  exports.list2 = function(req, res) {
  
      var var1 = req.body.Model;
      var var2 = req.body.Color;
  
  };
  </code></pre>
  
  <p>This is ow I pass a parameter to GET in $Resource</p>
  
  <pre><code>angular.module('alls').factory('Alls', ['$resource', function($resource) {
  
  return $resource('alls/:issuename', {issuename: '@issuename'},
      {   
          get:{ method: 'GET', isArray:true }
  
      });
  }]);
  </code></pre>
  
  <p>How Can I pass an Array?</p>