I have a class in a seperate file. I need to create an instance of it in another file. I tried this:
var connection = new require('./connection.js')("ef66143e996d");
But this is not working as I wanted. Right now I am using this as a temporary solution:
var Connection = require('./connection.js');
connection = new Connection("ef66143e996d");
Two Questions;
First, why doesn't that work.
Second, how can I accomplish this with a one-liner?