Introduction
Overview
Node.js is a runtime that lets you run JavaScript outside the browser — on your laptop, on a server, in a container in the cloud. It was created in 2009 by Ryan Dahl, who took Google Chrome’s V8 JavaScript engine and wrapped it with everything a server needs: access to files, networks, processes and the operating system.
Today Node.js is one of the most widely used back-end platforms in the world. Netflix, PayPal, LinkedIn, Uber, Walmart and countless start-ups run it in production, and almost every modern front-end tool — Vite, webpack, ESLint, Prettier, TypeScript’s compiler — is itself a Node.js program.
If you already know JavaScript, Node lets you use that one language for the whole application: the browser, the server and the tooling in between.
What Node.js is made of
Node has three layers:
- V8 — the same engine that runs JavaScript in Chrome. It compiles your code to fast machine code.
- libuv — a C library that provides the event loop and does slow work (reading files, waiting for network replies) in the background, so your JavaScript never has to sit and wait.
- Node.js APIs — modules such as
fs(files),http(web servers),path,stream,cryptoandchild_process, which you import into your programs.
The browser versus Node
The JavaScript language is identical — variables, functions, classes, promises, async/await all work the same. What changes is the environment around it:
| In the browser you have… | In Node.js you have… |
|---|---|
window, document, the DOM |
process, globalThis |
fetch, localStorage, setTimeout |
fetch, files (fs), setTimeout |
| Code limited to the page’s sandbox | Full access to files, network and processes |
| Runs on each visitor’s device | Runs once, on a machine you control |
That last row matters: Node code can read any file the user running it can read, open network ports and start other programs. With that power comes responsibility for security, which this course takes seriously from the start.
Why Node is fast for servers
A web server spends most of its time waiting — for a database to reply, for a file to load, for an external API to respond. Many traditional servers dedicate a whole thread to each request, and that thread sits idle while it waits.
Node takes a different approach. Your JavaScript runs on a single thread, and every slow operation is handed off to libuv and the operating system. While one request waits for the database, Node is already handling the next one. When the database replies, a callback is queued and your code picks up where it left off. This non-blocking I/O model lets a single Node process handle thousands of simultaneous connections with very little memory.
The trade-off: because there’s one main thread, heavy CPU work (resizing huge images, complex calculations) can hold everything up. You’ll learn how to deal with that using worker threads and child processes later in the course.
What people build with Node
- REST and GraphQL APIs — the back end for web and mobile apps. This is the main focus of this course.
- Real-time applications — chat, live dashboards, multiplayer games and collaborative editors, using WebSockets.
- Command-line tools — from small scripts that rename files to tools used by millions, like npm itself.
- Build tools and developer tooling — bundlers, linters, test runners and frameworks.
- Server-rendered websites — frameworks such as Next.js, Nuxt, Remix and Astro run on Node. (This very course site is built with Astro.)
- Serverless functions and microservices — small, fast-starting services in the cloud.
What you’ll learn
The course has 14 chapters in six stages:
- Runtime basics — installing Node, modules and npm, the
processobject, configuration, events, the event loop and error handling. - Files and streams — paths, reading and writing files, buffers, and streaming huge amounts of data with tiny amounts of memory.
- HTTP and Express — building a web server by hand so you understand what frameworks do, then building properly with Express.
- REST APIs and data — API design, input validation, project structure, PostgreSQL, transactions, migrations and Redis caching.
- Security and real-time — password hashing, sessions, JWTs, API hardening, file uploads, WebSockets and background jobs.
- Shipping it — automated testing, performance and scaling, logging, graceful shutdown, Docker and deployment.
By the end you’ll have built a complete REST API with authentication, a database, tests and a production-ready Docker image — the same skills employers look for in back-end and full-stack developers.
Before you start
You should be comfortable with modern JavaScript: const and let, functions and arrow functions, objects and arrays, destructuring, classes, and especially promises and async/await. If any of those feel shaky, the JavaScript Essentials course covers them all.
You’ll also use a terminal (Terminal on macOS, Windows Terminal or PowerShell on Windows). You only need a few commands — moving between folders and running programs — and the next topic walks you through them.
How to get the most from this course: type the examples yourself, run them, then change something and run them again. Back-end skills are learned by building, breaking and fixing things.
Summary
- Node.js runs JavaScript outside the browser, using Google’s V8 engine plus libuv for files, networking and timers.
- Instead of the DOM, Node gives you APIs for files, HTTP, processes, streams and cryptography.
- Its non-blocking design lets one process serve thousands of connections at once.
- Node powers APIs, real-time apps, command-line tools and build tooling across the industry.
- The course builds up to a complete, tested and deployed REST API.