Learn Node.js
Learn Node.js online through our comprehensive course. Build scalable backend applications and REST APIs using JavaScript.
Curriculum
01Introduction
What is Node.js?
Node.js is a runtime that allows you to run JavaScript on the server.
Browser vs Node.js
Node.js doesn't have DOM APIs (no window or document), but it adds server APIs (file system, http).
The V8 Engine
Node.js is built on Google Chrome's V8 JavaScript engine for high-performance execution.
Event-Driven Architecture
Node.js relies heavily on events rather than traditional threading.
Non-blocking I/O
Node.js does not wait for file or network operations to finish before moving to the next line of code.
Node.js vs PHP
Understand the architectural differences between Node.js and traditional web backends like PHP.
02Installation & Running
Running Scripts
You execute JavaScript files using the `node` command in your terminal.
The process Object
The `process` object provides information about the current Node.js process.
Command Line Arguments
`process.argv` contains the command-line arguments passed when the Node process was launched.
Exit Codes
Use `process.exit()` to terminate the process and return a status code to the OS.
03Project Structure
04Packages
05Modules
06Core Modules
Built-in Modules
Node.js ships with several built-in modules for interacting with the OS.
Path Module
Safely construct and manipulate file paths across different operating systems.
URL Module
Easily parse and construct URLs.
Crypto Module
Generate UUIDs, hashes, and secure random numbers.
Child Processes
Execute system shell commands from within Node.js.
07File System
08Async Programming
Callbacks
The oldest way Node.js handled async tasks. Can lead to "callback hell".
Promises
A cleaner way to chain async operations.
Async / Await
Syntactic sugar over Promises, making async code look synchronous.
Parallel Execution
Run multiple asynchronous tasks simultaneously to save time.
Promisify
Convert older callback-based APIs into Promise-based APIs.
09HTTP Servers
The HTTP Module
Create a native web server without external frameworks.
Basic Routing
Respond differently based on the URL requested.
Headers and Status Codes
Send metadata and HTTP status codes to the client.
Parsing Request Bodies
Native Node.js requires streaming the request body manually.
Fetch API in Node
Node.js 18+ includes the native `fetch` API for making outbound HTTP requests.
Middleware Concepts
Functions that execute sequentially during an HTTP request cycle.
10REST APIs
11Node Ecosystem
12Environment Configuration
13Node + MongoDB
14Node + SQL
15Full-Stack Architecture
16Authentication
17Security
18Streams & Buffers
21Debugging
22Production
Production Architecture
Structure enterprise apps properly rather than dumping everything in one file.
Process Management (PM2)
Keep your Node.js app alive, automatically restart it if it crashes, and utilize multiple CPU cores.
Graceful Shutdown
Ensure database connections and current requests finish before shutting down the server.
23Advanced Async
24Performance
Explore the Node.js Ecosystem
Continue learning Node.js
Access all Node.js lessons and tutorials.
Practice Node.js exercises
Apply your knowledge with interactive coding challenges.
Test your knowledge with Node.js quizzes
Check your understanding with multiple-choice questions.
Browse the Node.js reference
Quickly look up syntax, methods, and properties.