Free Online Course · Self-paced
Node.js Tutorial for Beginners (Hands-On)
Free, hands-on Node.js tutorial - installation, REPL, file system, child processes, Express, MongoDB, authentication, error handling, debugging, and HTTPS. 35+ runnable lessons.
- 60 parts
- ~378 min total
- Beginner to Intermediate
- Updated May 2026
Node.js is the most-deployed JavaScript runtime outside the browser, and Express is the most-used framework on top of it. This tutorial walks you through Node.js the way you will actually use it - file system, child processes, HTTP servers, async patterns, Express APIs, MongoDB integration, debugging, and deployment.
We start with installation and the REPL, then move through the file system (because every Node.js script eventually reads a file), async patterns (callbacks, promises, async/await, loops without footguns), HTTP/HTTPS servers, Express + database integration (MongoDB + Mongoose, MySQL), and finally testing, debugging, and Heroku deployment. Every example is a small, runnable snippet you can paste into a fresh node REPL.
Click Start the course to begin with installation, or jump to the chapter you need - Async Patterns and Express and Databases are the most-bookmarked.
What you'll learn
- Install Node.js on any OS and understand the runtime, REPL, and global objects
- Read and write files asynchronously, traverse directories, and spawn child processes
- Build HTTP servers, REST APIs, and HTTPS endpoints with the built-in modules and Express
- Handle async patterns (callbacks, promises, async/await, async loops) without footguns
- Build a CMS with Express + MongoDB, authenticate users with Passport, and paginate large collections
- Debug and troubleshoot the most common Node.js errors
Prerequisites
- JavaScript fundamentals (variables, functions, callbacks, promises, async/await)
- Comfortable on the command line
- Node.js LTS installed (use nvm where possible)
- Optional - MongoDB or MySQL for the database chapters
Syllabus
11 chapters · 60 lessons · ~378 min of reading
-
1 Installation and First Steps 7 lessons
- Part 1 Install Node.js on Ubuntu 20.04 5 min read
- Part 2 How to use the Node.js REPL 7 min read
- Part 3 Run the REPL inside a function 6 min read
- Part 4 Node.js global objects explained 6 min read
- Part 5 Read environment variables 5 min read
- Part 6 Pass arguments to an npm script 4 min read
- Part 7 println() equivalent in Node.js 4 min read
-
3 File System 11 lessons
- Part 12 Create a directory if it doesn't exist 5 min read
- Part 13 Check if a file or directory exists 5 min read
- Part 14 List all files in a directory 6 min read
- Part 15 List files recursively 6 min read
- Part 16 Loop through files in a directory 7 min read
- Part 17 Read JSON files 6 min read
- Part 18 Write a file 7 min read
- Part 19 Get the current working directory 4 min read
- Part 20 Get the script's own directory path 5 min read
- Part 21 Check if a path is a subdirectory of another 6 min read
- Part 22 Parse CSV data 6 min read
-
4 Async Patterns (callbacks, promises, async/await) 9 lessons
- Part 23 forEach in Node.js 6 min read
- Part 24 Loop through an array 6 min read
- Part 25 Async for loop in Node.js 7 min read
- Part 26 Async while loop 7 min read
- Part 27 Wait for a loop to finish before continuing 4 min read
- Part 28 Is Node.js single-threaded? 6 min read
- Part 29 Multithreading with worker threads 7 min read
- Part 30 Sleep / delay in Node.js 12 min read
- Part 31 Create a 10-second timer 6 min read
-
5 HTTP, HTTPS and Networking 4 lessons
-
6 Express and Databases 6 lessons
-
7 Child Processes and System 1 lesson
-
8 Strings, Objects, Arrays 8 lessons
- Part 43 Base64 encode and decode 8 min read
- Part 44 Log a full object (no truncation) 6 min read
- Part 45 Map function for objects 6 min read
- Part 46 Update a key with a new value 4 min read
- Part 47 Add items to an array 4 min read
- Part 48 Sort a Map by value 7 min read
- Part 49 Generate a unique ID (UUID) 12 min read
- Part 50 Node.js Date constructor 6 min read
-
9 Error Handling, Debugging and Common Errors 6 lessons
-
10 Testing and Heroku Deployment 3 lessons
-
11 Working with jQuery (server-side rendering) 1 lesson

