Learn Node.js
Server-side JavaScript lessons and API projects
- How Node.js Works
Connect V8, the event loop, libuv, worker threads, and the native thread pool.
- ECMAScript and JavaScript
Understand the standard behind JavaScript and how runtimes implement language features.
- let, const, and var
Choose block-scoped declarations and understand hoisting and reassignment.
- Functions and Higher-Order Functions
Use declarations, expressions, arrows, callbacks, and higher-order functions correctly.
- Closures
Use lexical scope to retain private state and build reusable functions.
- Prototypes, call, apply, and bind
Understand prototype inheritance and control a function’s this value.
- Deep and Shallow Copy
Recognize shared nested references and choose the correct copying strategy.
- Function Composition
Combine small functions into readable data-processing pipelines.
- Currying
Transform multi-argument functions into reusable chains of single-argument functions.
- Loops and Array Iteration
Choose for, for...of, forEach, map, filter, and reduce according to intent.
- Control Flow
Coordinate sequential, parallel, and conditional asynchronous operations.
- CommonJS require and ES Module import
Choose and configure CommonJS or ES modules without mixing incompatible assumptions.
- Node.js Globals
Work with process, Buffer, timers, module paths, and other runtime-provided values.
- npm and npx
Manage project dependencies with npm and execute package binaries with npx.
- The Node.js REPL
Experiment with JavaScript interactively and use useful REPL commands.
- The Node.js util Module
Use promisify, format, inspect, and other utilities for integration and diagnostics.
- Synchronous and Asynchronous Execution
Recognize blocking work and keep I/O-heavy services responsive.
- Callbacks and Callback Hell
Understand callback execution and replace deeply nested flows with clearer abstractions.
- Promises and Asynchronous APIs
Model eventual results with promises and consume them safely with async/await.
- Async/Await
Use promises and async/await to express asynchronous workflows and handle failures clearly.
- Promise Combinators
Use all, allSettled, race, and any according to failure and completion requirements.
- Concurrency in Node.js
Distinguish concurrency, parallelism, asynchronous I/O, and CPU-bound execution.
- The Node.js Event Loop
Understand event-loop phases, microtasks, nextTick, timers, and non-blocking I/O.
- libuv and Non-Blocking I/O
Understand the native eventing and thread-pool layer beneath Node.js asynchronous APIs.
- The Reactor Pattern
Understand how readiness events and handlers enable non-blocking I/O.
- EventEmitter
Create and consume event-driven APIs with Node.js EventEmitter.
- Timers, nextTick, and setImmediate
Predict scheduling order across nextTick, promise microtasks, timers, and immediates.
- Child Processes
Choose between exec, execFile, spawn, and fork when work must run outside the main process.
- Clustering and Worker Threads
Use processes or threads appropriately for multi-core and CPU-intensive workloads.
- Node.js Streams
Process data incrementally with readable, writable, duplex, and transform streams.
- File System Operations
Read, write, update, and remove files with the Node.js file-system APIs.
- Synchronous File Operations
Understand when synchronous file APIs block the event loop and when they are acceptable.
- HTTP Status Codes
Return status codes that accurately describe successful and failed HTTP operations.
- HTTP Methods
Use GET, POST, PUT, PATCH, DELETE, and idempotency correctly in an API.
- Express Application Basics
Build a small Express server with middleware, routes, and a listening port.
- Express Middleware
Build request pipelines that validate, transform, authorize, and terminate requests.
- Cookies and Sessions
Use browser cookies safely for sessions, preferences, and authentication state.
- JSON Web Tokens
Issue, validate, expire, and protect signed tokens without confusing encoding with encryption.
- Authentication and Authorization
Separate identity verification from permission checks and return the correct HTTP responses.
- Monolithic and Microservices Architecture
Compare deployment, ownership, data, and operational tradeoffs across architectures.
- Horizontal and Vertical Scaling
Compare scaling up with scaling out and understand their operational tradeoffs.
- Node.js Best Practices
Structure, secure, observe, and scale maintainable Node.js services.
- Hosting Node.js Applications
Prepare a Node.js service for deployment behind a process manager and reverse proxy.
- Localization
Design localized applications with external message catalogs and locale-aware formatting.
- Real-Time Communication
Compare polling, server-sent events, WebSockets, and WebRTC for live applications.
- WebSockets and Socket.IO
Build a two-way event channel between a Node.js server and browser clients.
- The API Test Pyramid
Balance unit, integration, and end-to-end tests for reliable HTTP services.
- HTML Test Fixtures
Create a minimal browser fixture for manually testing a Node.js HTTP or real-time server.
- DOM Fundamentals
Understand the browser document model when a Node.js service renders or serves a web client.
- Event Delegation
Handle many browser events efficiently through bubbling and a shared ancestor.
- JavaScript Runtime Examples
Practice execution order, scope, and asynchronous behavior with focused examples.
- Node.js Interview Review
Review the runtime, asynchronous execution, APIs, security, testing, and architecture.
- Node.js Interview Questions
Practice explaining Node.js internals, modules, APIs, and production decisions.