Hackathon project for EthBoston (2019): https://devpost.com/software/ethercam
-
ssh into the Raspberry pi and install nvm and the latest nodejs. Make note of the node version.
-
Clone the project as a bare repo.
By default it's assumed your git project folder is
~/git/ethercam.git
git clone --bare git://theproject.git
-
Create a folder for the actual built project to live
By default it's assumed your built project folder is
~/projects/ethercam
-
Add the
hooks/post-receive
file from this project to~/git/ethercam.git/hooks/
This will make it so that pushing to this repo will automatically check it out in the
projects
folder and build it. -
Add the
systemd/nodeserver.service
file from this project to/etc/systemd/system/
, making sure to change the node version number and location in theExecStart
section if neededThis starts up the node project as soon as the pi boots
-
Make the file executable with
sudo chmod +x /etc/systemd/system/nodeserver.service
-
Enable the systemd service with
sudo systemctl enable nodeserver