Since I open sourced MagicMirror², I have received many awesome pull requests adding a lot of nice features to the Magic Mirror core. I am very grateful for that! Unfortunately, this comes with a downside: the application gets a lot more complicated.
I started an issue on GitHub to discuss the idea of simplifying the core of MagicMirror². Please let me know what you think! (Preferably in that issue).
I just want to add, that using pm2 flush in a script (for restart purposes) may not work as expected. The next operation will start immediately, before flush completes, and thus the new thread will already start writing to the file, blocking it from getting cleared.
You need to wait for the entire thread to finish, like this:
pm2 flush; pm2 start mm; echo "this doesn't clear the logs";
pm2 flush && pm2 start mm; echo "now it works";
I’ve just overhauled the installer script.
It now checks if Node needs to be upgraded or installed and gives a bit more visual feedback. It will also prevent overwriting older installations.
If you can, please test it and let me know if it works for you.
I have an API on my website which retrieves the latest version directly from the NodeJS website.
Feel free to use it: http://api.jordidepoortere.com/nodejs-latest/
Example usage in the script:
NODE_LATEST=$(curl -l http://api.jordidepoortere.com/nodejs-latest/)