Aicloud E-Learning

Guided Notes

Introduction to Node.js

Running JavaScript outside the browser.

Node.js lets JavaScript run outside a browser — on a server, in a script, anywhere — by embedding the same V8 engine Chrome uses, plus APIs for things a browser doesn't need (like reading files or opening network sockets).

Code is organized into modules: `require("module-name")` (or `import` in modern Node) pulls in code from another file or an installed package.

npm (Node Package Manager) ships with Node and manages third-party packages — a project's dependencies are listed in `package.json`, and `npm install` downloads them into `node_modules`.