I try to include a .js file in my app with node require(), but get this error. Any idea?
a.js :
function a() {
this.a = 'a';
}
Node application :
require(./a.js);
var test = new a();
Error:
/Users/.../app.js:14
var test = new a()
^
ReferenceError: a is not defined