Learn Node.js

Server-side JavaScript lessons and API projects

  1. How Node.js Works

    Connect V8, the event loop, libuv, worker threads, and the native thread pool.

  2. ECMAScript and JavaScript

    Understand the standard behind JavaScript and how runtimes implement language features.

  3. let, const, and var

    Choose block-scoped declarations and understand hoisting and reassignment.

  4. Functions and Higher-Order Functions

    Use declarations, expressions, arrows, callbacks, and higher-order functions correctly.

  5. Closures

    Use lexical scope to retain private state and build reusable functions.

  6. Prototypes, call, apply, and bind

    Understand prototype inheritance and control a function’s this value.

  7. Deep and Shallow Copy

    Recognize shared nested references and choose the correct copying strategy.

  8. Function Composition

    Combine small functions into readable data-processing pipelines.

  9. Currying

    Transform multi-argument functions into reusable chains of single-argument functions.

  10. Loops and Array Iteration

    Choose for, for...of, forEach, map, filter, and reduce according to intent.

  11. Control Flow

    Coordinate sequential, parallel, and conditional asynchronous operations.

  12. CommonJS require and ES Module import

    Choose and configure CommonJS or ES modules without mixing incompatible assumptions.

  13. Node.js Globals

    Work with process, Buffer, timers, module paths, and other runtime-provided values.

  14. npm and npx

    Manage project dependencies with npm and execute package binaries with npx.

  15. The Node.js REPL

    Experiment with JavaScript interactively and use useful REPL commands.

  16. The Node.js util Module

    Use promisify, format, inspect, and other utilities for integration and diagnostics.

  17. Synchronous and Asynchronous Execution

    Recognize blocking work and keep I/O-heavy services responsive.

  18. Callbacks and Callback Hell

    Understand callback execution and replace deeply nested flows with clearer abstractions.

  19. Promises and Asynchronous APIs

    Model eventual results with promises and consume them safely with async/await.

  20. Async/Await

    Use promises and async/await to express asynchronous workflows and handle failures clearly.

  21. Promise Combinators

    Use all, allSettled, race, and any according to failure and completion requirements.

  22. Concurrency in Node.js

    Distinguish concurrency, parallelism, asynchronous I/O, and CPU-bound execution.

  23. The Node.js Event Loop

    Understand event-loop phases, microtasks, nextTick, timers, and non-blocking I/O.

  24. libuv and Non-Blocking I/O

    Understand the native eventing and thread-pool layer beneath Node.js asynchronous APIs.

  25. The Reactor Pattern

    Understand how readiness events and handlers enable non-blocking I/O.

  26. EventEmitter

    Create and consume event-driven APIs with Node.js EventEmitter.

  27. Timers, nextTick, and setImmediate

    Predict scheduling order across nextTick, promise microtasks, timers, and immediates.

  28. Child Processes

    Choose between exec, execFile, spawn, and fork when work must run outside the main process.

  29. Clustering and Worker Threads

    Use processes or threads appropriately for multi-core and CPU-intensive workloads.

  30. Node.js Streams

    Process data incrementally with readable, writable, duplex, and transform streams.

  31. File System Operations

    Read, write, update, and remove files with the Node.js file-system APIs.

  32. Synchronous File Operations

    Understand when synchronous file APIs block the event loop and when they are acceptable.

  33. HTTP Status Codes

    Return status codes that accurately describe successful and failed HTTP operations.

  34. HTTP Methods

    Use GET, POST, PUT, PATCH, DELETE, and idempotency correctly in an API.

  35. Express Application Basics

    Build a small Express server with middleware, routes, and a listening port.

  36. Express Middleware

    Build request pipelines that validate, transform, authorize, and terminate requests.

  37. Cookies and Sessions

    Use browser cookies safely for sessions, preferences, and authentication state.

  38. JSON Web Tokens

    Issue, validate, expire, and protect signed tokens without confusing encoding with encryption.

  39. Authentication and Authorization

    Separate identity verification from permission checks and return the correct HTTP responses.

  40. Monolithic and Microservices Architecture

    Compare deployment, ownership, data, and operational tradeoffs across architectures.

  41. Horizontal and Vertical Scaling

    Compare scaling up with scaling out and understand their operational tradeoffs.

  42. Node.js Best Practices

    Structure, secure, observe, and scale maintainable Node.js services.

  43. Hosting Node.js Applications

    Prepare a Node.js service for deployment behind a process manager and reverse proxy.

  44. Localization

    Design localized applications with external message catalogs and locale-aware formatting.

  45. Real-Time Communication

    Compare polling, server-sent events, WebSockets, and WebRTC for live applications.

  46. WebSockets and Socket.IO

    Build a two-way event channel between a Node.js server and browser clients.

  47. The API Test Pyramid

    Balance unit, integration, and end-to-end tests for reliable HTTP services.

  48. HTML Test Fixtures

    Create a minimal browser fixture for manually testing a Node.js HTTP or real-time server.

  49. DOM Fundamentals

    Understand the browser document model when a Node.js service renders or serves a web client.

  50. Event Delegation

    Handle many browser events efficiently through bubbling and a shared ancestor.

  51. JavaScript Runtime Examples

    Practice execution order, scope, and asynchronous behavior with focused examples.

  52. Node.js Interview Review

    Review the runtime, asynchronous execution, APIs, security, testing, and architecture.

  53. Node.js Interview Questions

    Practice explaining Node.js internals, modules, APIs, and production decisions.