21-day Node.js Self-Learning Roadmap
21-day Node.js Self-Learning Roadmap
By the end, you should be able to:
Build a RESTful API with Node.js + Express
Connect it to MongoDB
Understand authentication, routing, middleware, and deployment basics
Focus: Understand JavaScript backend environment deeply
Day
Topic
What to Learn
Practice Ideas
1
Setup & Intro
Install Node.js, npm/yarn, run your first script. Learn about REPL, modules, require, and exports.
Print “Hello Node”, log system info using os module.
2
Modules & File System
fs, path, os modules. Understand synchronous vs asynchronous.
Create a file writer/reader using fs.
3
Events & Streams
EventEmitter, readable/writable streams.
Create custom event and file stream example.
4
Asynchronous JS
Callbacks, Promises, async/await.
Write a small script to fetch data from a public API using fetch.
5
HTTP Module
Create simple HTTP server without frameworks. Understand req, res.
Make a mini website that serves HTML from a file.
6
NPM & Packages
Using npm, package.json, install/uninstall packages.
Install a few packages like chalk, nodemon, axios.
7
Practice Project 1
Combine what you learned.
Create a command-line weather app using axios and fs.
Focus: Learn Express framework to build real APIs
Day
Topic
What to Learn
Practice Ideas
8
Intro to Express.js
Routing, middleware, app.get(), app.post().
Build routes /, /about.
9
Express Router
Modular routes, parameters.
Create user routes (/users/:id).
10
Middleware & Error Handling
Learn built-in, custom, and third-party middleware.
Use a logger like morgan.
11
REST API Design
CRUD basics (Create, Read, Update, Delete).
Make CRUD API for a simple object (like books or students).
12
Working with JSON
Use express.json(), send/receive data.
Test using Postman or Thunder Client.
13
Environment & Config
Use .env and environment variables.
Practice with dotenv package.
14
Practice Project 2
Combine all Express concepts.
Build “Task Manager API” (CRUD with in-memory array).
Focus: MongoDB, Mongoose, JWT, deployment basics
Day
Topic
What to Learn
Practice Ideas
15
MongoDB Basics
Install MongoDB or use Atlas. Learn CRUD commands.
Create sample database and insert few docs.
16
Mongoose ORM
Schema, models, CRUD via Mongoose.
Connect your API to MongoDB.
17
Validation & Error Handling
Mongoose validation, handling errors in Express.
Add validation to user schema.
18
Authentication (JWT)
Learn bcrypt, jsonwebtoken.
Create signup/login API.
19
Advanced APIs
Pagination, sorting, filtering.
Add query filters to Task API.
20
Project: Full API
Combine everything.
Build a mini “User Notes API” with login + CRUD.
21
Deployment
Push to GitHub, deploy on Render or Vercel.
Make it live! 🎉
Use VS Code + extensions: “REST Client”, “ESLint”, “Prettier”.
Watch short YouTube tutorials when stuck (e.g., by Traversy Media, Web Dev Simplified).
Practice every day — even 2 hours a day is enough if consistent.
Document what you build (small notes in Notion or a README).
Once confident:
Learn MongoDB deeper (indexes, aggregation).
Learn React.js (frontend).
Connect both → full MERN stack project.