wget -O - https://raw.githubusercontent.com/audstanley/NodeJs-Raspberry-Pi/master/Install-Node.sh | sudo bash
node -v
npm -v
ssh-keygen -b 2048 -t rsa
cd
cd .ssh
touch authorized_keys
sudo chmod 700 ~/.ssh/
sudo chmod 600 ~/.ssh/authorized_keys
cat id_rsa.pub
Add it to your GitHub SSH Settings.
cd
cd Documents
mkdir Repos
cd Repos
git config --global user.email "[email protected]"
git config --global user.name "Myles O'Connor"
git clone [email protected]:mocon/pi-a-la-node.git
cd pi-a-la-node
npm start
Open your .bashrc file, which holds terminal configuration:
sudo nano ~/.bashrc
Add this line to the top of it:
source ~/.bash_profile
Press Ctrl-O to save the changes, and Ctrl-X to exit the file.
Create your .bash_profile file:
nano ~/.bash_profile
Add the following to it, then save with Ctrl-O, Ctrl-X as before:
alias aliases="nano ~/.bash_profile"
alias k="clear"
alias gs="clear && git branch && git status"
alias gd="git diff"
alias repos="cd ~/Documents/Repos"
alias project="cd ~/Documents/Repos/pi-a-la-node"
sudo raspi-config
Select Interfacing Options > SSH > Yes > Ok > Finish.
Assuming your Raspberry Pi hostname is raspberrypi, and your user is the default pi (to check your hostname, go to Raspberry Pi menu in left corner > Preferences > Raspberry Pi Configuration):
ssh [email protected]
You will be asked for your Raspberry Pi password.
exit