I have two programs. A server in NodeJS and a script in Python.
Basically, the script scrapes and writes data to a JSON file.
What I want to do, is to make the NodeJS server reset the JSON file without altering with the Python program.
I tried a simple writeFile, but it outputs random characters sometimes.
I know how to use signals, but I don't know if it's a good idea to interrupt my Python script randomly with a signal.
I also know how to use pipes, but is it a good idea ?
What can I do ?