I have this code:
let manager;
exports.setup = async manager => {
this.manager = manager;
};
This is possible duplicate but every time I saw this, solution was to use window.manager = manager to set global variable from inside function. How to do this in Node.JS where is no window?
this.manager not working, because its seems this.manager !== manager (the global one)