nodeJs - can't acces required properties : <p>I have 2 separate files - the main script file and config.js located in the same folder.</p>

<p>I then require the config.js as a variable, and try to access it's url property, but somehow it does not get injected properly. What am I doing wrong?</p>

<p>If I define a local variable with the url, and pass it into my function everything works as expected.</p>

<p>main.js:</p>

<pre><code>//import configuration
var config = ("./config.js");

casper.start(config.url);
</code></pre>

<p>config.js</p>

<pre><code>module.exports = {
    url: 'http://stage2.btobet.net/en',
    credentials: [{ user: 'Tester', password: '' },
        { user: 'Automat', password: '' }]
};
</code></pre>

<p>Thanks for the help.</p>
