IONIC - 2 Installing NodeJs
Click here for more videos available on our youtube channel !To start an Ionic project we need Node.js, so we begin by installing it. Head over to the official Node.js website. The page automatically detects your operating system and shows a message like "Download for macOS" if you are on a Mac. The same works on Windows and Linux, with the right link suggested for your system.
We pick the LTS (Long Term Support) version, which is the most stable build, and click to download it. Once the package is downloaded, we open it to launch the installation wizard. The wizard walks you through the introduction, the license agreement (read it if you need to and accept), the destination on disk, and finally the install step. On macOS the system asks for your password before installing; the installation itself is quick.
Verifying the installation
Once it finishes, we want to confirm Node.js is properly installed on the machine. Open a terminal and run the following command, which prints the installed Node.js version:
node -v
The terminal answers with something like v16.13.0, which confirms that Node.js is correctly installed.
One last thing to keep in mind: Node.js is neither a server nor a framework. It is simply a JavaScript runtime environment that can be used to write server-side services, often exposed as APIs (Application Programming Interfaces). In that sense, Node.js is an alternative to traditional server languages such as PHP, and we will rely on it as the foundation to install and run the Ionic tooling in the next lesson.