How to Install Node.js on Windows Server 2019

Node.js is a Javascript runtime built with fast deployments in mind. Both the client and server-side of the application are Javascript. It provides an asynchronous approach to serving up content, providing for extremely responsive applications. Node.js is cross-platform and installable on Linux, macOS, and Windows. This tutorial will help you to install Node.js on a Windows Server 2019

Install Node.js steps

Step 1: Install Node.js

First, you need to visit the Node.js Downloads page and select the version related to your operating system and download it

Click on the Windows Installer icon to start downloading the installer:

We will download the Windows Installer (.msi) 64-bits. To do this, click on the link to complete the download.

Next, click on the downloaded in the browser, this should open up the installer:

At this point, you need to choose a custom location and click Next to install.

Next, you need to select the Node.js features that you want to be installed on your Windows server. We select the Add to Path and click Next

At this point, you can check the box next to Automatically install the necessary tools and click Next. Node.js will do everything for you by default.

Finally, select Install:

When your installation is completed, click Finish to exit from the setup wizard.

At this point, you will get into the command line press any key to continue, and your administrative PowerShell will open. This will install your required packages and tools.

To verify that you have correctly installed Node.js on your Windows server 2019, check the Node and NPM version from a command line:

node -v
npm -v

Example of run a Node.js Application

Click cmd in the search results to open the Command Prompt

Enter the following command, then press Enter to create a file named GreenCloud containing a simple application that will print out the result 2+2

echo console.log(2+2); >> GreenCloud

Type node followed by the name of the application, which is GreenCloud in this case, and then press Enter

node GreenCloud

Conclusion

Now that Node.js is installed, it’s possible to start working on Node.js applications!

On this page