What is Nodejs
Nodejs is a :
- a run-time environment that allows JavaScript code to be executed outside of a browser
- 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.
- There are two primary use cases: server-side scripts and command-line utilities.
- 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
- Visit Nodejs
- Click on the recommended download button or select your binary installer, after downloading click on the .exe file to install on your PC
- Run the installer
- 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)
- After opening the command prompt type
node --version
to get the version on Nodejs installed
macOs
- Visit Nodejs
Click on the “ macOS Installer ” option to download the .pkg installer. Make sure you download it to your desired location.
Run the installer
Installing from home brew
brew install node
after that runnode --version
Linux
- Open your terminal and run
sudo apt install nodejs
- Installing on Arch Linux
pacman -S nodejs npm
- 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)