@roma-cezar you need to put your code into a node_helper as it is based on node dependencies. Then you can communicate via sockets between the helper and the module. you can have a look in other modules which have a node_helper file how the communication works. also you can have a look in the developer guide here https://github.com/MichMich/MagicMirror/blob/master/modules/README.md
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
R