Install NodeJS on Armbian
#Armbian #NodeJS #SBC
Full steps can be found at https://i12bretro.github.io/tutorials/0507.html
--------------------------------------------------------------------
What is NodeJS
--------------------------------------------------------------------
Node.js is an open-source, cross-platform, JavaScript runtime environment. It executes JavaScript code outside of a browser. - https://github.com/nodejs/node
--------------------------------------------------------------------
Installing NodeJS
--------------------------------------------------------------------
01. Log into the Armbian device
02. Run the following commands in a terminal window
# download nodejs
wget -O nodejs.tar.xz https://nodejs.org/dist/v14.17.0/node-v14.17.0-linux-arm64.tar.xz
# extract nodejs.tar.xz
tar -xJf nodejs.tar.xz
# change directory to extracted folder
cd node-v14.17.0-linux-arm64
# copy node binaries to /usr/local
sudo cp -R * /usr/local/
# test node is working
node -v
# test npm is working
npm -v
--------------------------------------------------------------------
Running a Test NodeJS Application
--------------------------------------------------------------------
01. Run the following commands in a terminal window
# install git
sudo apt install git -y
# make a working diretory
mkdir ~/njs-demo && cd ~/njs-demo
# clone demo github repo
git clone https://github.com/benc-uk/nodejs-demoapp.git
# cd into src directory
cd nodejs-demoapp/src
# install dependencies
npm install
# run the demo app
node server.js
02. Open a web browser and navigate to http://DNSorIP:3000
### Connect with me and others ###
★ Discord: https://discord.com/invite/EzenvmSHW8
★ Reddit: https://reddit.com/r/i12bretro
★ Twitter: https://twitter.com/i12bretro