In this Rasperry pi tutorial we will check how to get started using Node.js on the Rasperry pi. We will develop a very simple “hello world” application. This tutorial was tested on a Raspberry Pi 3 model B+.
Introduction
In this raspberry tutorial we will check how to get started using Node.js on the Rasperry Pi 3. We will develop a very simple “hello world” application.
This tutorial was tested on a Raspberry Pi 3 model B+, running version 4.9 of Raspbian, installed using NOOBS.
The Node.js version used was 12.2.0. This version is more recent than the one that originally comes installed with Raspbian. Nonetheless, this tutorial should also work for older versions. If you want to update your Node.js version, please follow this guide.
The procedure
The first thing we will do is opening a command line. Once you do it, simply type the following command and press Enter:
node
This should open the Node.js interpreter, where we can send commands. Figure 1 illustrates the expected result after sending the previous command.
Figure 1 – The Node.js interpreter.
After this, for printing a “hello world” message, simply write the following command and hit Enter:
console.log("Hello world")
You should get a result similar to figure 2. As can be sen, the “Hello World” message gets printed to the console, as expected.
Figure 2 – Printing a “Hello World” message with Node.js.
Starting Nov 21st (EST), grab a Mystery Box for just $1 and stand a chance to get Raspberry Pi 5B / LattePanda 3 Delta Single Board Computers, with guaranteed prizes worth over $15!
Explore the performance of Small Language Models (SLMs) on the Raspberry Pi 5 SBC, including models like mathstral, phi 3, llama 3.1, gemma2 2b, and Qwen.
Explore our top picks for interactive sensors, DIY lighting, essential maker tools, and exciting project ideas to make this Halloween truly unforgettable!