title: Node.js: how to reload module
body: <p>I am new to NodeJS so probably I am doing some mistakes.</p>
  
  <p>I have written a bunch of code in an external file called myapp. I start NodeJS for windows and from the interpreter window I type:</p>
  
  <pre><code>var myapp = require('d:/myapp.js');
  </code></pre>
  
  <p>then I can use my functions and variables in the external module.</p>
  
  <p>The problem is that if I update the code in myapp then the interpreter does not re-read the file and it uses the old version.</p>
  
  <p>Now, is this normal in the first place? How to work around this problem?</p>
  
  <p>P.S.: I have spent hours in internet and searched in many forums including this. It was more confusing then anything else.</p>
  
  <p>Thanks.</p>