How to import module in nodejs from some external file
<p>I have this file <code>indexjs</code> where I am exporting data</p>

<pre><code>exports.updateMobileNumber = updateMobileNumber;
</code></pre>

<p>and in my appjs I am importing it.</p>

<pre><code>var index = require('./../helpers/index');
</code></pre>

<p>Now another file mainjs is on external URL like </p>

<p><code>https://github.com/../models/catalog/main.js</code></p>

<p>How to import this file in my appjs</p>

<p><em>I don't want to download the file</em> as it has its own server. Is it possible to make <code>http</code> request from one nodejs to another nodejs running simultaneously so that I get the required value. If yes, please help how to do it!</p>

<p><strong>I have 1st node running at 3000 and another running at 3003, what should be the next step?</strong></p>