Setting Up node.js
Installing node.js and npm
We already discuss about node js and it's importance now lets learn how to download node js and build application.
In order to develop a Node.js application, you need to install two components: node.js and the node package manager (NPM).
In this guide, we will cover the installation of both Node.js and NPM.
Installing node.js
Visit the node.js Official Website
To download, go to the official website and click on the “Downloads” tab. You’ll see two versions: Long Term Support (LTS) and Current. I recommend using the LTS version for most projects because it’s more stable and gets updates for a long time.
If download not started then goes to other download choose you system specific file.
Download the Installer
Most of the time, the website will recognize your OS and provide the download link automatically. if it does not Select the installer that matches your Windows, MacOS, or Linux operating system and click the download button.
Click on the installer package
Run the Installer
Once the installer has been downloaded, execute the installer file. The installation usually includes: Accepting the license agreement Selecting the installation location Confirming the installation
Select components to include or remove from the installation. I prefer default.
Verify the Installation
Once you are done with the installation process, you can check if you have successfully installed Node.js by going to your terminal or command prompt and running the following command:
node -v #show you the installed version of Node.js.
npm -v #show the npm version
Installing npm
npm is bundled with node.js, so after you install node.js, you will automatically have npm installed on your machine. However, it is important to update the version of npm, as new releases usually include bug fixes and enhancements.
Update npm
To update npm to the latest version execute the following command in the terminal or command prompt.
npm install -g npm@latest #This command installs the latest version of npm globally..
Verify npm Installation
Make sure npm is up to date by checking its version.
npm -v #You should see the updated npm version number
Node.js and npm are installed and you are ready to build applications and manage dependencies for your node.js projects.
In the following sections, we will look at popular code editor and tools that improve the development experience in node.js.
Code Editors
Choosing the correct code editor and tools is essential for the smooth and efficient development. Let’s take a look at some of the most popular code editors and development tools that are commonly used by developers.
Visual Studio Code (VSCode)
Visual Studio Code is Microsoft’s lightweight and powerful code editor. It include following feature :
An integrated terminal for executing Node.js directly in the editor.
Automatic completion and code suggestions.
Has a huge selection of Node.js extensions.
To install VSCode, visit the official website.
Sublime Text
Sublime Text is one of the most widely used cross-platform text editors. It is highly customizable and can be tailored to your specific needs. Sublime Text provides:
Multiple cursors for simultaneous editing.
Command Palette for quick access to various commands.
A great community that contributes packages and themes.
To install Sublime Text visit the official website
Subscribe to my newsletter
Read articles from Adarsh Kumar Debata directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Adarsh Kumar Debata
Adarsh Kumar Debata
A software developer with a focus on backend technologies. Learning skills, on the way to level up.