run script on raspberry pi startup code example
Example 1: run on startup pi
sudo nano /etc/rc.local
Then add commands and do CTRL+X and press y to save
Example 2: get raspberry pi to run node on startup
su pi -c 'node /home/pi/server.js < /dev/null &'