First Node.js Code

Prerequisites:

Check out the previous post to come on track with us!

To implement your 1st node.js project, open the terminal in the project directory, and initialize your nodejs project with the following command:

npm init

--

--

Node.js is an open-source server environment that allows you to run JavaScript on the server.

Installing & Running Node.js: Windows

  1. Visit nodejs.org and download the LTS version of Node.js for Windows by clicking the “Windows Installer” option.
  2. Run the downloaded Node.js .msi Installer - accept the license and select the folder to install.
  • This step requires Administrator privileges, and you may need to authenticate
  1. To ensure Node.js has been installed, run node -v in your terminal - you should get something like v15.3.0
  2. Update your version of npm with npm install npm --global
  • This step also requires Administrator privileges so you may need to authenticate

Congratulations — you’ve now got Node.js installed, and are ready to start building!

--

--

Dhruv Rohatgi

Dhruv Rohatgi

Designer| Developer| Innovator| Founder at HelixSmartLabs Pvt. Ltd.