Node.js on the Raspberry

sudo apt update

sudo apt full-upgrade -y


apt list nodejs


Major Version Upgrades

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash –

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash –

sudo apt install nodejs

node -v

v8.11.3 LTS

  • $ node
  • > 1 + 3
  • 4
  • > # We can hit Ctrl-C twice to exit the REPL and get back to the bash (shell) prompt.

 


excerpt from http://thisdavej.com/beginners-guide-to-installing-node-js-on-a-raspberry-pi/

Install Node.js and Npm on Raspberry Pi

Install Node.js and Npm on Raspberry Pi: You can build many apps using node.js and npm on your raspberry pi and it’s very easy to interact with GPIO or other components connected to your raspberry pi. So if you are like me and like to do it on node.js here a few simple steps to install n…