Got yourself a Raspberry Pi? Let’s get started with Installing Node.js on a Raspberry Pi.
Before we get into action, what is really Node.js
By default Raspberry Pi actions are done using Python language. Node.js provides an alternative way to program actions on Raspberry Pi. We will cover more in later post on the difference between Node.js and Python in Raspberry Pi development. There are few versions of Node.js as listed here. Node.js with 0.xx versions are default nodejs before merging with IO.js. Node.js with 4.xx and later are after the merging. Currently IO.js team merged with Node.js team. All the functionality of IO.js has been made available in Node.js.
Let’s get started.
- Make sure Raspberry Pi all set with OS. Can read more here on how to setup.
- Make sure Pixel OS up to date. You can do so by following command below
apt-get update && apt-get upgrade -y
- By default PixelOS preinstaleld with NodeJS. So practically you can start to work on NodeJS projects. The package installed are Node.js before IO.js merger.
To check installed version you can run the command below;
- You can find the released versions here.
- We will update the Node.js to the latest available version. Follow the commands below to update.
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - sudo apt install nodejs node -v
- Your Raspberry Pi should have been updated with latest version. So get started with Node.js projects.
Find Node.js projects on Techworked.