HOW NODE.JS WORKS BEHIND THE SCENES
Node.js is a JavaScript runtime that uses a complex event loop with six distinct phases (timers, pending callbacks, idle/prepare, poll, check, and close callbacks) to perform non-blocking I/O operations on a single thread. It uses the libuv C/C++ library to directly access operating system resources for handling asynchronous operations like file reading, network requests, and timers.