title: calling nodejs function from the same file and from the different file
body: <p>Model.js file has the following entry</p>
  
  <pre><code>exports.update = function(tag,view,date){
  {
      .....
      ....
  }
  </code></pre>
  
  <p>and calling the function like </p>
  
  <pre><code> update('test','1213','11/10/2014')
  </code></pre>
  
  <p>it throws the following error, </p>
  
  <pre><code>update('test','1213','11/10/2014')
  ^
  ReferenceError: update is not defined
  </code></pre>
  
  <p>I can call the update module from the different file, without any error something like this</p>
  
  <pre><code>var model =  require('./Model');
  model.update('test','1213','2001/1/23')
  </code></pre>
  
  <p>The question is how can invoke the Update method from the same js (Model.js )file</p>