title: How to get data from mongoose model and store with variable like mvc using node.js
body: <p>Here below code is sample MVC framework code in PHP. I need same process as like in node.js with mongoose also. </p>
  
  <p>I'm using Node.js, MongoDB, REST API development.</p>
  
  <p><em>controller file:</em> </p>
  
  <pre><code>&lt;?php
  class Myclass {
   public function store_users() {
     //get the data from model file
     $country = $this-&gt;country-&gt;get_country_details($country_id);
    //After getting data do business logic
   }
  }
  </code></pre>
  
  <p><em>model file</em></p>
  
  <pre><code>&lt;?php
  class Mymodel {
   public function get_country_details($cid) {
    $details = $this-&gt;db-&gt;table('country')-&gt;where('country_id',$id);
    return $details;
   }
  }
  </code></pre>
  
  <p>In node.js need to use as like MVC PHP process. Kindly suggest on this.</p>