Code Skiller logoCB Logo
Logo LearnLearnLogo PracticePracticeLogo HireHireLogo IDEIDE

Introduction to Node JS

User image

Published by

sanya sanya

Published at: 28th Jul, 2023
1.295 mins read

What is node js?

Node.js is an open-source, server-side runtime environment that allows you to execute JavaScript code outside of a web browser. It uses Google's V8 JavaScript engine, which is the same engine that powers the Google Chrome browser.

Traditionally, JavaScript was mainly used for client-side scripting in web browsers to enhance the functionality of websites. However, Node.js extends the use of JavaScript to the server-side, enabling developers to build scalable, high-performance web applications and networked services.

Advantages of Node Js

Various Advantages of Using Node JS are mentioned below -

  1. High performance - Node.js is built on Google's V8 JavaScript engine, which compiles JavaScript code directly into machine code. This results in fast and efficient execution, allowing Node.js applications to handle a large number of concurrent requests with low response times.

  2. Asynchronous and non-blocking - Node.js uses an event-driven, non-blocking I/O model, which allows it to handle multiple requests concurrently without getting blocked. This design enables efficient handling of I/O operations, such as reading from or writing to databases or file systems, making Node.js ideal for building scalable and responsive applications.


How to Run JS file Using Node

We have to follow some steps to run the Javascript file using the Node JS -

  1. Install Node.js

  2. Create a JavaScript file

  3. Open a terminal

  4. Navigate to the file's directory - Use the cd command to navigate to the directory where your JavaScript file is located.

  5. Run the JavaScript file using the code below.
node app.js

Library

WEB DEVELOPMENT

Basic

Frontend

Backend

Node JS

Node Modules

Restful Routing

Static Files

REST API

Introduction to Node JS

GET vs POST

Database

Interview Questions

FAANG QUESTIONS

On this page

What is node js?

Advantages of Node Js

How to Run JS file Using Node