Many powerful open source projects have Node.js as a dependency, so often times you’ll need to set it up on your web server.
But what if you wanted to develop and test your Node-dependent projects in your Windows PC before putting it up on the server?
Setting up Node.js locally is quite simple. In this tutorial, I’ll walk you through the following:
- Installing Node.js
- Running a Node app in your browser
- Installing Node packaged modules via npm
- Uninstalling Node
A note on nomenclature: The official name of the project is Node.js or node.js, and many people refer to it simply as Nodeor node. Throughout the tutorial, these terms will be used interchangeably.
Node has a Windows and Mac installer, as well as binaries for Linux users. We’ll be going over how to install Node on Windows, but the general process is the same regardless of which operating system and OS version you’re using.
To start, head over to the Downloads page of Node.js. Click on the installer you would like to download and install. For this tutorial, we’re using the 64-bit Windows Installer, but you should use the most appropriate version for your set-up.
Click on the installer file from your computer to open up the Node.js Setup Wizard.
Just go through the Setup Wizard until Node has finished installing.
You’re done installing Node.js as well as npm. (The latter is installed with Node.js by default.)
Now you can open Command Prompt and type there node -v which tells you what version node you have.