Learn Node.js.
Understand the runtime and build reliable HTTP APIs.
Node.js essentials
Start with the essentials or pick the concept you need.
01Node internalsExplore concepts
02HTTP & APIsExplore concepts
- Which HTTP status codes should I know?2 min
- PUT vs PATCH, and what does idempotent mean?2 min
- HTTP/1.1 vs HTTP/2 vs HTTP/3?2 min
- How do cookies and sessions work?2 min
- What is CORS? Does it protect an API from all clients?2 min
- How do ETag and caching work?2 min
- How should pagination and API versioning work?2 min
03Authentication & securityExplore concepts
04Production engineeringExplore concepts
What you will study in Node.js
Focused lessons organized by concept. Start with the explanation, trace the examples, and check your recall before moving on.
Node internals
Node.js is a JavaScript runtime designed to handle many operations that spend time waiting for I/O. It lets the operating system and supporting runtime facilities wait for work, then runs ready JavaScript callbacks on an event-loop thread. This makes one process useful for many concurrent connections without one JavaScript thread per request.
HTTP & APIs
An HTTP status code describes the outcome of an HTTP request using a standard numeric category. Clients use it to decide whether to use a result, correct a request, authenticate or retry. A response body can add application details, but should not contradict the status code.
Authentication & security
JWT is a token format, not a role: an access token can be a JWT or another format. An access token authorizes calls to an API, while a refresh token is used with the identity service to obtain new access tokens. Separating these roles limits how long a stolen access token is useful and supports longer login sessions.
Production engineering
Production readiness means an application can be operated, monitored and recovered under normal load and failure. Working business logic is only one part; configuration, resource limits, startup, shutdown and observability also affect users. A ready service should fail clearly and avoid accepting work it cannot safely complete.
Runtime & modules
CommonJS and ES Modules are two systems for dividing JavaScript code into reusable modules. CommonJS uses runtime require calls, while ES Modules provide standard import and export declarations with a statically described dependency structure. Their loading and interoperability rules depend on the runtime and file configuration.