I have code to sent event like this:
process.emit('event', event);
I would like to listen to these event like this:
process.on('event', function(event) {
//HANDLING LOGIC
});
It works fine when files are located in the same folder. When I located listener in other folder it is not fired. What can be a root cause of this and hwo can I handle it?
EDIT:
The actual problem was just a missing expose with a file including event handling. Shame on me.