Node.js is based on javascript and is easy to learn. If you want to find out more about Node.js, just check out this link: External – What is Node.js? .
Before you can use Node.js, you need to install it, but there are only binaries for the Pi and Pi 2, so you need to be sure, that you own one of the newer models.
Now lets get started installing Node.js on the Raspberry Pi.
1. Update Node.Js source to repositority
1 |
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - |
The “x” stands for the newest version of major release 7.
2. Install package
1 |
sudo apt-get install nodejs |
3. Verify installation
1 |
node -v |
If it shows you the right version, then you are done!
Congratulation, you have successfully installed Node.js on the Raspberry Pi!