I'm trying to run background tasks (file system scanner) using NW.js.
In Electron, it can be done using child_process.fork
(__dirname + '/path_to_js_file')
and calling child.on('message', function(param) { ... })
and child.send(...)
in the main script and process.on('message', function(param) { ... })
and process.send(...)
in the child script.
In NW.js, I tried to use Web Workers but nothing happens (my webworker script is never executed).
I also saw there is a workaround using child_process.fork("path_to_js_file.js", {silent: true, execPath:'/path/to/node'})
but that implies bundling Node.js into my future app...
Another idea?