Web
HTML
CSS
JavaScript
TypeScript
Frontend
React
Next.js
AngularJS
Backend
Node.js
Python
Java
PHP
C
C++
Rust
Databases
SQL
MySQL
PostgreSQL
MongoDB
Tools
Git
DSA
HTML
CSS
JavaScript
SQL
Python
Java
PHP
React
Nextjs
MySQL
PostgreSQL
MongoDB
C
Cpp
Rust
Git
TypeScript
NodeJS
AngularJS
DSA
NodeJS
Overview
Learn NodeJS
This is a starter landing page for NodeJS. Replace this paragraph with a short, friendly description of the topic and what readers will learn from the tutorial series.
Tutorial contents
What is Node.js?
History of Node.js
Why Use Node.js?
How Node.js Works
Node.js vs Browser JavaScript
The V8 JavaScript Engine
libuv & the C++ Core
Single-Threaded, Non-Blocking I/O
When to Use (and Not Use) Node.js
Installing Node.js
Install on Windows
Install on macOS
Install on Linux
Version Management with nvm
LTS vs Current Releases
The Node.js REPL
Running Your First Script
Editor & Dev Environment Setup
Hello World in Node.js
JavaScript Essentials for Node
Callbacks Refresher
Promises Refresher
async / await Refresher
ES6+ Features You Need
Node.js Architecture Overview
The global Object
Global Variables & Functions
The process Object
Command-Line Arguments (process.argv)
Environment Variables (process.env)
Process Events & Signals
The console Module
Timers (setTimeout, setInterval)
setImmediate & process.nextTick
Introduction to Modules
CommonJS Modules (require)
module.exports & exports
How require() Resolves Modules
The Module Wrapper Function
ES Modules (import / export)
CommonJS vs ES Modules
Module Caching
Creating Local Modules
Core, Local & Third-Party Modules
Introduction to npm
package.json Explained
package-lock.json & Lockfiles
Installing Packages
dependencies vs devDependencies
Semantic Versioning (SemVer)
npm Scripts
Running Packages with npx
Global vs Local Packages
Updating & Auditing Packages
Yarn & pnpm Alternatives
Publishing a Package to npm
Monorepos & Workspaces
Core Modules Overview
The path Module
The os Module
The util Module
The url Module
The querystring Module
The crypto Module
The events Module
Event-Driven Programming
The EventEmitter Class
Emitting & Listening to Events
EventEmitter Patterns
Handling error Events
Asynchronous Programming in Node
The Event Loop in Depth
Event Loop Phases
Microtasks vs Macrotasks
Blocking vs Non-Blocking Code
The Callback Pattern
Callback Hell & How to Avoid It
Promises in Node.js
async / await in Node.js
util.promisify
Async Control-Flow Patterns
The File System (fs) Module
Reading Files
Writing Files
Sync vs Async vs Promises API
Appending to Files
Deleting & Renaming Files
Working with Directories
File Stats & Metadata
Working with File Paths
Watching Files for Changes
Buffers & Binary Data
Introduction to Streams
Readable Streams
Writable Streams
Duplex & Transform Streams
Piping Streams
Backpressure
stream.pipeline & Error Handling
Networking in Node.js
TCP Servers (net Module)
UDP Sockets (dgram Module)
DNS Lookups (dns Module)
The http Module
Creating a Web Server
Request & Response Objects
HTTP Methods
HTTP Status Codes
HTTP Headers
Basic Routing (No Framework)
Serving HTML & Static Files
Serving JSON Responses
Handling Form Data
Parsing Query Strings
Making HTTP Requests (http/https)
Creating an HTTPS Server
Introduction to Express.js
Installing & Setting Up Express
Your First Express App
Express Routing
Route Parameters
Query Parameters
The Request Object
The Response Object
Express Router & Modular Routes
Serving Static Files
What is Middleware?
Application-Level Middleware
Router-Level Middleware
Built-in Middleware
Third-Party Middleware
Writing Custom Middleware
Error-Handling Middleware
Parsing Request Bodies
CORS
Cookies (cookie-parser)
What is a REST API?
REST Principles & Constraints
Designing API Endpoints
CRUD Operations
Request Validation
Consistent Error Responses
Pagination, Filtering & Sorting
API Versioning
Rate Limiting
Documenting APIs (OpenAPI/Swagger)
REST API Best Practices
Server-Side Templating
EJS
Pug
Handlebars
Why Validate Input?
Validation with Joi
Validation with Zod
express-validator
Databases with Node.js
SQL vs NoSQL
Introduction to MongoDB
Using the MongoDB Driver
Mongoose ODM
Mongoose Schemas & Models
Mongoose Queries & Population
PostgreSQL with node-postgres
MySQL with Node.js
Sequelize ORM
Prisma ORM
TypeORM
Redis & Caching
Connection Pooling
Database Migrations
Transactions
Authentication vs Authorization
Hashing Passwords (bcrypt/argon2)
Sessions & Cookies
JSON Web Tokens (JWT)
Implementing JWT Auth
Access & Refresh Tokens
Passport.js
OAuth 2.0 & Social Login
Role-Based Access Control
Protecting Routes
Error Handling in Node.js
Error Types & the Error Object
try/catch with async/await
Operational vs Programmer Errors
Custom Error Classes
Centralized Error Handling
Uncaught Exceptions
Unhandled Promise Rejections
Graceful Shutdown
Node.js Security Overview
OWASP Top 10 for Node
Securing Headers with Helmet
Input Sanitization
Preventing SQL/NoSQL Injection
Cross-Site Scripting (XSS)
CSRF Protection
Managing Secrets & API Keys
Dependency Vulnerability Scanning
TLS/HTTPS & Secure Transport
Security Best Practices
Testing in Node.js
Unit, Integration & E2E Tests
Built-in Test Runner (node:test)
Testing with Jest
Mocha & Chai
API Testing with Supertest
Mocking & Stubbing
Code Coverage
Test-Driven Development
Logging in Node.js
Winston
Pino
HTTP Logging with Morgan
Structured Logging
Monitoring & APM
Health Checks & Metrics
Debugging Node.js
The Built-in Debugger & Inspector
Debugging in VS Code
Debugging with Chrome DevTools
Diagnostics & Diagnostic Report
Performance Overview
Profiling Node.js Apps
Finding Memory Leaks
Caching Strategies
Response Compression
Load Testing
Optimization Best Practices
Concurrency in Node.js
Child Processes
spawn, exec, execFile & fork
The cluster Module
Worker Threads
Scaling Node.js Applications
Real-Time Apps Overview
WebSockets (ws)
Socket.IO
Server-Sent Events (SSE)
Introduction to GraphQL
Apollo Server
Schemas & Type Definitions
Resolvers
GraphQL vs REST
Consuming Third-Party APIs
The Built-in fetch API
HTTP Requests with Axios
Building & Receiving Webhooks
Building Command-Line Tools
Parsing Arguments
Commander.js
Interactive Prompts (Inquirer)
Publishing a CLI Tool
Using TypeScript with Node
Setting Up a TS Node Project
Typing an Express App
ts-node & tsx
Configuration Management
Environment Variables with dotenv
NODE_ENV & Environments
Config Best Practices
Auto-Restart with nodemon
Linting with ESLint
Formatting with Prettier
Git Hooks (Husky & lint-staged)
Useful Developer Tools
Deploying Node.js Apps
Preparing for Production
Process Management with PM2
Reverse Proxy with Nginx
Containerizing with Docker
Docker Compose
Deploying to the Cloud
Serverless Node.js
CI/CD Pipelines
Production Configuration
Project Structure
Layered Architecture
The MVC Pattern
Separation of Concerns
The Twelve-Factor App
Dependency Injection
Common Design Patterns
Code Style & Conventions
Node.js Best Practices
Introduction to Microservices
Monolith vs Microservices
Message Queues
RabbitMQ
Apache Kafka
gRPC
Inter-Service Communication
API Gateways
Event Loop: Advanced Internals
Memory Management
Garbage Collection in V8
Tuning the Garbage Collector
Native Addons (N-API)
C/C++ Addons
WebAssembly in Node.js
async_hooks
Performance Hooks (perf_hooks)
The vm Module
Modern Node.js Features
Top-Level await
Built-in Watch Mode (--watch)
The Permission Model
Built-in --env-file Support
Single Executable Applications
Node.js Cheat Sheet
Common Mistakes to Avoid
Common Interview Questions
Project Ideas to Build
Further Learning Resources