DEV Community

Cover image for What you need to know about Node.js
Kater Akeren
Kater Akeren

Posted on • Edited on

What you need to know about Node.js

What is Node.js?

  • Node.JS is a concept for executing JavaScript on the server.

  • Ryan Dahl, the original creator of Node.js, who has recently released another ground-breaking technology called Deno.

  • Node.js is a cross-platform, open-source JavaScript run-time that is based on the V8 JavaScript engine found in Google Chrome.

  • A non-blocking, single-threaded, event-driven I/O model

  • NPM packages are used in the development of Node.js.

  • It has shown to be the greatest tool for creating data-intensive, quickly scalable, and network applications.

The underlying architecture of Node.js

Node.js's foundational components include JavaScript, V8, libuv, C++, and JavaScript. As Node developers, the five characteristics provide a greater degree of abstraction that greatly facilitates our work.

  • V8 Engine

    • Without it, Node.js would not have been able to understand the JavaScript programs we create.
    • It is in charge of converting Node.js code into machine code that the computer can comprehend and properly execute.
  • Libuv

    • Asynchronous I/O (Input/Output) is a key focus of this open-source software.- 
    • Node.js has access to operating systems, file systems, networking, and other systems thanks to this layer.
    • It implements the two Node.js functionalities that are most crucial:
    • Event Loop: this is in charge of carrying out basic operations like Callbacks, Network IO, and others.
    • Thread Pool: In charge of heavier tasks like file access, compression, and other things.
  • The V8 and Libuv are both built in C++, and the V8 also includes some JavaScript code in its library. In other words, JavaScript and C++ were used to create the language node.js

Apply Node.js to:

  • Streaming of data

  • API with database integration (preferably NoSQL Databases)

  • A real-time chat program

  • Server-side web applications

  • Hardware programming 

Avoid using Node.js for:

  • Programs that use a lot of server-side processing (High CPU Intensive usage)

Install Node.js now.

  • Go to Node.JS

  • Pick the version that is compatible with your OS. Because they are stable, LTS (Long Term Support) versions are strongly suggested.

  • Download and set it up.

  • Keep in mind to read and follow each stage's appropriate instruction.

Checking to see whether Node.js is installed properly

  • Open a terminal window or CLI (Command Line Interface) and enter the following command:
    node -v or node --version
Enter fullscreen mode Exit fullscreen mode

love and best wishes ❤️...

Top comments (0)