I'm running a node app via a shell script
#STARTUP.sh
node server.js
#/etc/rc.local - this runs on startup of my machine
sudo sh startup.sh >> /home/pi/logs/app.log 2>&1
My issue is, when I have an error in my node app it just crashes and doesn't write the error to app.log
Is there a way to make sure when the app crashes that the error gets logged as well?