Apr 05, 2021 • 2 min read
Install Node
Node.js Installation
The Node.js programming language is an open source project to make programmers more productive.
Node.js is flexible and easy to learn. Its wide adoption is primarily down to the universal nature of the language. If you have a web browsers such as Google Chrome, it comes with a very rudamentary development environment as part of dev tools. The web is already available everywhere, so why not learn the language of the web? JavaScript is very quick to learn. If you want to move beyond that to topics such as Node.js, and Express, JavaScript is an ideal language. In most cases, having this language in your arsenal will be very useful to build quite powerful applications.
Check out the available NodeJS distributions. Consider the target environment for the application to be built.
- If you need to integrate with other solutions, it is often not useful to go with the bleeding edge version.
- If you have a greenfield project, select the latest long term support (LTS) version.
Configuration
Download the application from the NodeJS repository e.g..
curl -sL https://deb.nodesource.com/setup_12.x -o nodesource_setup.shRun the script to install Node
sudo bash nodesource_setup.shFollow the onscreen instructions:
sudo apt-get install -y nodejsInstall Yarn
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarnDependencies: It may be necessary to install additional packages
sudo apt install -y build-essential libssl-devTest Installation
Confirm the install of NodeJS by checking the version
node -vConfirm the installation of the npm package manager
npm -v Development
npm init --yes