Skip to content

About

A beginner-friendly Node.js course, from your first server to a tested, documented REST API with Express 5, MongoDB and JWT authentication. 30 step-by-step sessions with tested examples, animated diagrams, exercises and interview questions.

Topics

Resources

Stars

9 stars

Watchers

0 watching

Forks

Latest commit

 

History

75 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js Learning Path

A free, beginner-friendly course that takes you from your first line of Node.js to a complete, tested REST API.

There are 30 short sessions. Each one is a single page you can read right here on GitHub. You learn one idea at a time, run real code, and build up to a final project: a Task Management API with Node.js, Express and MongoDB.


Table of Contents


Who This Course Is For

  • Complete beginners to backend development
  • Frontend developers who want to build their own APIs
  • Students who want a clear, step-by-step path

No backend experience is needed.


What You Need

You need Details
Basic JavaScript Variables, functions, arrays, objects, if and loops
Node.js 24 (LTS) or newer Session 01 shows how to install it
A code editor VS Code is recommended
A terminal PowerShell or Git Bash on Windows, Terminal on macOS and Linux
MongoDB (from Session 17) A free MongoDB Atlas account or a local install. Session 17 shows both

How to Use This Course

1. Open the first session. Read it on GitHub, or download the course to read offline

git clone https://github.com/mohin-sheikh/nodejs-learning-path.git
cd nodejs-learning-path

2. Go in order. Every session builds on the ones before it.

3. Type the code yourself. Make a practice folder, type each example (do not copy and paste), run it, and compare your result with the output shown in the session.

4. Practice before moving on. Finish the exercises at the end of each session.

What is inside each session

Every session has

  • Simple explanations, one idea at a time
  • Code examples that were run and tested, with the real output
  • Practice exercises

Most sessions also have

  • Animated diagrams that show how things work
  • Common beginner mistakes, and how to fix them
  • Interview questions to check your understanding

How long it takes

Plan for 1 to 2 hours per session. At one session a day, with time for practice, most learners finish in 4 to 6 weeks.


Course Outline

Part 1: Getting Started

# Session You will learn
01 Introduction to Node.js What Node.js is, how to install it, and running a file
02 Project Setup and npm package.json, installing packages, npm scripts
03 How Node.js Works The event loop, callbacks, promises, async/await
04 Modules and Imports Splitting code into files with require and module.exports

Part 2: Core Modules

# Session You will learn
05 File System Module Reading and writing files, folders and JSON
06 Path Module Building file paths that work on every computer
07 OS Module System information and the process object
08 Events and EventEmitter Creating and listening to your own events

Part 3: Building Servers

# Session You will learn
09 HTTP Module How the web works, and a server with no framework
10 Building Your First Server Routes, JSON responses and status codes
11 CRUD with Dummy Data Create, read, update and delete data in memory

Part 4: Express.js

# Session You will learn
12 Introduction to Express.js Your first Express 5 server
13 Express Routing URL parameters, query strings and routers
14 Middleware Code that runs before your routes
15 Building REST APIs with Express REST rules, validation and a clean response format
16 Environment Variables Keeping settings and secrets in a .env file

Part 5: Databases

# Session You will learn
17 MongoDB Introduction Documents, collections, Atlas, Compass and mongosh
18 MongoDB CRUD Operations Saving and finding data with the MongoDB driver
19 Mongoose Schemas, models, validation and relationships
20 Express + MongoDB CRUD API A complete API with search, filters and pages
21 MVC Architecture Organizing code into models, views and controllers

Part 6: Security

# Session You will learn
22 Authentication with JWT Register, log in, protected routes and user roles
23 Password Hashing with bcrypt Storing passwords safely and changing them

Part 7: Production Skills

# Session You will learn
24 Error Handling Catching errors so the server never crashes
25 File Uploads with Multer Uploading and checking files safely
26 Logging Useful logs with winston and morgan
27 API Documentation Interactive docs with Swagger
28 Testing APIs Automated tests with Jest and Supertest
29 Project Structure Best Practices A clean folder layout, and request validation with Joi

Part 8: Final Project

# Session You will learn
30 Mini Project: Task Management API Putting everything together in one real project

Final Project

In Session 30 you build the backend of a to-do app, step by step, using everything from Sessions 1 to 29.

Phones and laptops call the Task API, which uses MongoDB, stores pictures, writes logs and shows its docs

Users can

  • Register and log in
  • Create, read, update and delete their own tasks
  • Filter tasks by status, page by page
  • See statistics, such as how many tasks are overdue
  • Upload a profile picture
  • Change their password and delete their account

The project also has

  • Password hashing, login tokens and user roles
  • Request validation with Joi on every route that receives data
  • Central error handling and logging
  • Interactive API documentation at /api-docs
  • 31 automated tests

Tools You Will Learn

Tool What it is for Session
Node.js and npm Running JavaScript on a server, installing packages 01, 02
Express Building web servers and APIs 12
dotenv Loading settings from a .env file 16
MongoDB and Mongoose Storing data 17 to 19
EJS Building HTML pages 21
jsonwebtoken, bcryptjs Login and passwords 22, 23
Multer File uploads 25
winston, morgan Logging 26
swagger-jsdoc, swagger-ui-express API documentation 27
Jest, Supertest, mongodb-memory-server Testing 28
Joi Checking request data 29, 30
helmet, cors, express-rate-limit Security 14, 29

All code was tested with Node.js 24, Express 5 and Mongoose 9.


What You Will Be Able to Do

After this course you will be able to

  • Explain how Node.js works, including the event loop
  • Build REST APIs with Express
  • Store and query data in MongoDB
  • Add sign-up, login and user roles
  • Validate request data, and handle errors, file uploads and logging the right way
  • Document and test your APIs
  • Organize a project the way professional teams do

Repository Structure

nodejs-learning-path/
├── 01-introduction-to-nodejs.md     one file per session
├── 02-project-setup-and-npm.md
├── ...
├── 30-mini-project.md
├── images/                          animated diagrams, one folder per session
└── README.md

Feedback

Found a mistake, or a part that is hard to understand? Please open an issue or send a pull request.

The code in this course is written for learning. Before putting an app online, read the security checklist and "Before You Deploy" in Session 30.


Ready? Start with Session 01: Introduction to Node.js.

About

A beginner-friendly Node.js course, from your first server to a tested, documented REST API with Express 5, MongoDB and JWT authentication. 30 step-by-step sessions with tested examples, animated diagrams, exercises and interview questions.

Topics

Resources

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors