title: In Node.js, am I creating a new object when "Require"?
body: <p>So, what I'm not sure is that. if in <strong>ModuleA</strong>, I have:</p>
  
  <pre><code>var mongoose = require('mongoose');
  mongoose.connect(pathA);
  </code></pre>
  
  <p>And in <strong>ModuleB</strong>, I have:</p>
  
  <pre><code>var mongoose = require('mongoose');
  mongoose.connect(pathB);
  </code></pre>
  
  <p>And in the main program, I have:</p>
  
  <pre><code>var mA = require('./moduleA.js'), 
  mB = require('./moduleB.js');
  </code></pre>
  
  <p>So, when I run the main program, I guess I will create two mongoose "instances"; one connecting to pathA and one connecting to pathB, is that right?</p>
  
  <p>Also, in Module B, before I connect to pathB, is it connected to pathA or nothing? </p>
  
  <p>Thanks. </p>