DEV Community

Cover image for Easy steps to set up Nodejs for development
owujib
owujib

Posted on • Edited on

Easy steps to set up Nodejs for development

What is Nodejs

Nodejs is a :

  1. a run-time environment that allows JavaScript code to be executed outside of a browser
  2. features an event-driven architecture that allows for asynchronous I/O (input/output) and is thus utilized in many real-time web applications, such as chat applications and game servers.
  3. There are two primary use cases: server-side scripts and command-line utilities.
  4. There is no need to master two languages to create full-stack applications because you can use javascript from the UI to the server you can read more about Nodejs

How to install Nodejs

To run Javascript on a server you need to have Nodejs installed. To install Nodejs and installing Nodejs is an easy step

Install Nodejs versions with even numbers because those releases are more stable

Windows

  1. Visit Nodejs
  2. Click on the recommended download button or select your binary installer, after downloading click on the .exe file to install on your PC
  3. Run the installer
  4. Sometimes you need to restart your PC. After that open your command prompt (press the win key + R and type cmd on the input box)
  5. After opening the command prompt type node --version to get the version on Nodejs installed

macOs

  1. Visit Nodejs
  2. Click on the “ macOS Installer ” option to download the .pkg installer. Make sure you download it to your desired location.

  3. Run the installer

  4. Installing from home brew brew install node after that run node --version

Linux

  1. Open your terminal and run sudo apt install nodejs
  2. Installing on Arch Linux pacman -S nodejs npm
  3. Run nodejs --version

What next to do after installing Nodejs? In my next article, I will be showing how to create a simple server using the Expressjs library

Top comments (0)