Mind~G
NodeJs

Node.js

Introduction to Node.js

  • NodeJS is not a language
  • It is a runtime environment that allows you to run JavaScript code outside the browser
  • It build using Chrome v8 engine(v8 wriiten in C++ ) + Libuv and v8 engine is responsible for converting JavaScript normal code into machine code that will understand by computer.
  • NodeJS is a single thread

Normally JavaScript runs only inside the browser like Chrome or Firefox But NodeJS allows JavaScript to run directly on your computer server or backend

Main parts inside NodeJS

  1. V8 Engine – runs JavaScript code
  2. Libuv – handles asynchronous tasks like file system network etc
  3. Event Loop – keeps checking for finished tasks and runs their callbacks
  4. Callback Queue – stores callbacks waiting to be run
  5. Thread Pool – background workers that do slow tasks

On this page