Node.js
Node.js
Node.js is an open-source,
cross-platform JavaScript Ryan Dahl developed it in 2009,
Developers use Node.js to
runtime environment and and its latest iteration, version
create server-side web
library for running web 15.14, was released in April
applications
applications outside the client's 2021.
browser.
The event loop continuously checks this queue and processes each
request.
Working
If a request involves an I/O operation, Node.js offloads it to the system
kernel, which handles it asynchronously.
Once the I/O operation is complete, the kernel notifies Node.js, executing
the corresponding callback function.
• While JavaScript is the programming language used with Node.js, the runtime environment
provides the tools and frameworks to build scalable and high-performance server applications.
Node.js’s non-blocking, event-driven architecture makes it ideal for real-time applications, web
servers, APIs, and more. In summary, Node.js is a robust environment that leverages
JavaScript to enable server-side programming, but it is not a programming language.
Global objects in
Node.js are available
in all modules.
These objects are
functions, modules,
strings, etc.
Streaming
Duplex: These are both readable and
writable streams
External Binding:
Internal Binding: Error
Error emitter is
emitter executes its
explicitly added to a
code inside the run
domain via its add
method
method
Applications of Single-Page
Streaming Command-
Node.js Applications
Applications Line Tools
(SPAs)
Internet of
Things (IoT)