Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that allows developers to build scalable, high-performance applications. It was created in 2009 by Ryan Dahl and has since become a popular platform for building server-side applications and network applications.
Node.js is built on the V8 JavaScript engine, the same engine used by the Google Chrome browser. It uses an event-driven, non-blocking I/O model, which makes it efficient and lightweight. This allows developers to build applications that can handle a large number of concurrent connections with minimal overhead.
JavaScript Runtime
│
┌──────┴──────┐
│ │
JS Engine Web APIs
│ │
Call Stack DOM / Timer
│ Fetch
└──────┬──────┘
│
Event Loop
│
Callback Queue
Before diving into Node.js, ensure you have a basic understanding of the following:
- Functions (Declaration, Arrow Functions, Callback Functions)
- Promises and Async/Await
- ES6+ Features (Destructuring, Spread/Rest, Template Literals)
- Modules (import/export)
- Basic Knowledge of Backend Development
- HTTP Protocol (Methods like GET, POST, PUT, DELETE)
- RESTful APIs
- JSON format
- Basic CLI (Command Line Interface) usage
Set-ExecutionPolicy RemoteSigned
Set-ExecutionPolicy Unrestricted
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned -Force
