title: Node: Get var from JS file from URL
body: <p>I have a request call that will call a javascript file that contains a var:</p>
  
  <pre><code>var url = 'http://' + _environment + '/services.js';
  
  request(url, function (error, response, body) {
     if (!error &amp;&amp; response.statusCode === 200) {
         _services = body;
     }
  
     console.log(_services);
  });
  </code></pre>
  
  <p>This will log something like the following:</p>
  
  <pre><code>var services = {
       "production": {
            "global": {
                 "id": "id",
                 "test2": "http://test.com",
                 "test": "/test/test.test",
                 "test1": "test"
            }
       }
  }
  </code></pre>
  
  <p>So to be exact, this line is equivalent to what I am ending up with:</p>
  
  <pre><code>var _services = var services = {
       "production": {
            "global": {
                 "id": "id",
                 "test2": "http://test.com",
                 "test": "/test/test.test",
                 "test1": "test"
            }
       }
  }
  </code></pre>
  
  <p>How to I pass a var from a js file located at some url to my code?</p>