After reading this guide, you may be interested in reading:
- Installed network connected Raspberry Pi 2 or newer
Start with a Raspberry Pi image. This is an image saved after following the RPi Initial Setup Guide. This may be either a lite or a full desktop image.
Write the image to the MicroSD as described in the RPi Initial Setup Guide. Insert the MicroSD into the Pi and boot.
Use an Ethernet cable to connect the pi to the network. DHCP will assign the pi an IP address. Find the address of your pi from your network's DHCP server.
- SSH to the pi at that IP address or yourpiname.local
The pi uses the ARM processor. Determine which instruction set version is included,
grep 'model name' /proc/cpuinfo. This output should include ARMv6, ARMv7, and so forth. The Raspberry Pi 3 uses the ARMv7 processor.
Visit the downloads page and select LTS Recommended for Most Users. Now copy the link to the correct ARM binary. In the following steps, replace node-v4.5.0-linux-armv7l with the version for your system.
- Change to home directory on the pi,
- Download the binary,
wget https://nodejs.org/dist/v6.5.0/node-v6.5.0-linux-armv7l.tar.xz, replace the URL with the link you copied above.
- Extract the binary,
tar -xvf node-v6.5.0-linux-armv7l.tar.xz
- Copy the files,
sudo cp -R * /usr/local/
- Rehash the shell,
- Check the version,
node -v. This should match what you downloaded.
- Check npm version,
Express.js is one of the most essential web frameworks for Node.js. It is a minimalist framework for building a host of web and mobile applications as well as application programming interfaces (APIs). Express.js is offers various features, like template engines, simplified multiple routing, database integration and more.
- Install with
sudo npm install express --save