Home / Node.js Beginner
Node.js Beginner
Node.js from a first program to a finished task API: modules, npm, the event loop, async code, files, HTTP servers, Express routes and a REST API. Every example runs for real against Node.js.
Node.js runs JavaScript on the server, for tools and websites alike. The course holds fifty short lessons, from a first program to a finished task API. Every example ran for real on Node.js v24.22.1 and Express 5.3.0.
Course contents
Work top to bottom — the sidebar is the course. Topics later in the list assume the ones before them.
Getting Started
- Node.js Introduction
- Installing Node.js
- Your First Node Program
- Running a JavaScript File
- The Node REPL
Modules
Start: Modules in Node.js ❯npm
Start: npm Introduction ❯The Event Loop
Start: How Node.js Works ❯Async JavaScript
Start: Callbacks in Node ❯File System
Start: Reading Files ❯HTTP
Start: The http Module ❯Express
Start: Express Introduction ❯Building an API
Start: REST Introduction ❯Serving and Settings
Start: Serving Static Files ❯Debugging and Tools
Start: Debugging Node.js ❯Capstone: A Task API
Beginner · ⏱ 5 min · standalone lesson
Learn Node.js
Node.js is the runtime that runs JavaScript outside the browser. A browser shows pages. Node.js runs programs, reads files, and answers web requests. One language then covers both sides of a website: the page in the browser and the server behind it. The course starts with a first program and ends with a working task API.
Ideas build in order, each one standing on the last. Modules and npm open the course, then the event loop and async code. Files follow, then the http module and a first server. Express arrives next, with routes, parameters, and query strings. A REST API leads into middleware, static files, and settings. Debugging and logging close the teaching, and the capstone ties the pieces into one server.
The fifty lessons sit in eleven groups, with the capstone standing on its own. Every closing example is a whole program, run for real on Node.js v24.22.1. Each page prints what its run gave. Server lessons start the real server under a timeout and ask it real questions. The answers in the lesson are the answers the server gave.
What you will learn
Fifteen things the course teaches, in teaching order:
- Run JavaScript with Node.js, from a first program to the REPL
- Share code between files with modules, require, and exports
- Use ES modules with import and export
- Manage a project with npm, package.json, and scripts
- Explain the event loop and tell blocking code from non-blocking code
- Write async code with callbacks, promises, and async and await
- Read and write files, folders, and paths with the fs module
- Watch a file and answer when it changes
- Serve pages and JSON with the http module
- Build routes with Express, including parameters and query strings
- Shape a REST API with GET and POST routes
- Read request bodies and keep data in memory
- Add middleware, serve static files, and read settings from the environment
- Handle errors in Express and debug with the inspector
- Finish a task API that ties the course together
Who this Node.js course is for
No server knowledge is needed. The opening lessons say what a runtime is before any server starts. Each new term is defined inside the example that first needs it. A little JavaScript helps: variables, functions, objects, arrays, and callbacks. Without that JavaScript, begin with the JavaScript Beginner course.
All fifty lessons add up to three hours and forty-eight minutes. The event loop and async lessons slow most readers down. A slow pass there is normal. Those two groups repay a second read.
Students bound for back-end work will find easy ground in the opening lessons before they meet bigger frameworks. Hobbyists planning a small tool or site get the footing a Node.js server expects. Readers coming from browser JavaScript meet the same language in server dress. Console scripts become programs that read files, and event listeners become routes that answer requests.
How this course works
Every example ran for real on Node.js v24.22.1, with Express 5.3.0 where Express is needed. Each page prints what its run actually gave. Server lessons start the real server, ask it real questions with curl, and show the real answers. One lesson runs the debugger for real and shows the line it prints.
Each lesson closes with a running program and one question. Lessons always arrive in the same order. Promises make little sense before callbacks land. Routes make little sense before the http module lands. Middleware makes little sense before routes land. Progress stays in this browser, on the machine you read with. The course asks for no account and no payment.
Frequently asked questions
Do I need JavaScript first?
Some JavaScript helps: variables, functions, objects, arrays, and callbacks. Every Node.js idea here starts from its definition, but JavaScript itself is not taught in this course. The JavaScript Beginner course covers the JavaScript this course needs.
Do the examples need a server running?
No. Most examples are short programs that print their answer and stop. The server lessons start a real server under a timeout and show what it prints and answers.
What version of Node.js does the course use?
Node.js v24.22.1. Every example ran on that version, and each page prints what its run actually gave. Express examples use Express 5.3.0.
Does Node.js need anything installed besides Node?
npm arrives with Node.js, so package work needs nothing extra. Express is the only package the course installs, with one npm command.
What will I have built when the course ends?
A small task API: tasks listed on one route, added with another, and marked done with a third. The capstone joins routes, request bodies, and middleware into one working server.
Next steps
- JavaScript ❯ — The JavaScript this course builds on: 55 lessons from a first program through classes, JSON, and timers.
- JavaScript Intermediate ❯ — After Node, go deeper into the language itself: 50 lessons on closures, prototypes, promises, async code, and fetch.
- SQL ❯ — Give your Node APIs a place to keep data. The SQL course holds 51 lessons on asking a database questions with select, filter, joins, and grouping.