#1 India's Top IT Training Institute
×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
Mentors

Mentors

Meet the industry experts who train and guide you through your course.

Read More →
Free Resources

Free Resources

Free tutorials, interview questions, tools and calculators to help you learn.

Explore →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →

Node.js Notes PDF

Free Node.js notes PDF: event loop, modules, Express routing and middleware, REST APIs, MongoDB with Mongoose, JWT auth, security and deployment.

11 pages · 147 KB · PDF · Updated 5 Nov 2026

Prepared by: Uncodemy trainer team  ·  Reviewed by: Uncodemy  ·  Last reviewed: 5 Nov 2026

Quick Answer

Uncodemy's Node.js notes PDF explains backend JavaScript in 11 handwritten-style pages: the runtime and event loop, modules and npm, core modules and files, async code and events, Express basics, routing and middleware, REST API design, MongoDB, Mongoose CRUD, JWT authentication, and error handling, security and config. It ends with six project ideas and ten practice questions, and is free to download after a short form.

Key takeaways

  • Explains why Node is non-blocking with a simple waiter example and an event loop diagram.
  • Shows the exact print order of sync code, promises and timers, a favourite interview question.
  • Builds REST APIs first in memory, then with MongoDB and Mongoose, then with JWT login.
  • Includes a security table: helmet, exact CORS origin, rate limiting, input validation and NoSQL injection.

About these Node.js notes

Node.js runs JavaScript outside the browser, on your computer or a server, using the V8 engine. It is event-driven and non-blocking: like one waiter serving many tables, it does not wait for a slow file or database call but takes the next request and comes back when the result is ready. That makes it a strong fit for APIs, chat apps and streaming. These notes start from the runtime itself, then build an API with Express and MongoDB and finish with authentication, security and deployment.

Please note: these are original Uncodemy study notes written in a handwritten style. They are not official documentation of the OpenJS Foundation, Express or MongoDB. Tools and versions change, so check the official docs linked below when something behaves differently on your machine.

What's inside the Node.js notes

The PDF has 12 numbered sections across 11 pages. Here is what each one covers.

Start with the runtime

What Node.js is, the client to Express to Mongoose to MongoDB flow, browser JavaScript versus Node.js, installing the LTS version, node --watch, and the weak spot of heavy CPU work.

Modules and npm

CommonJS versus ES modules, sharing a function between files, the main npm commands, package.json scripts, node_modules and package-lock.json.

Core modules and files

A table of fs, path, http, os, events, crypto and process, reading and writing files with fs/promises, a server with only the http module, and streams for big files.

Async code and events

Callbacks, promises and async/await, an event loop diagram, Promise.all, the print order of sync code, microtasks and timers, and EventEmitter.

Express basics

A first Express server, the useful parts of req and res, params and query, and the most common beginner bug: a missing express.json().

Routing and middleware

What middleware is (with an airport security example), a logger middleware, common middleware such as cors, helmet, morgan and rate limiting, and splitting routes with Router.

Building REST APIs

Routes, actions and success codes, an in-memory CRUD example, a status code table, versioning, pagination and testing with Postman, Thunder Client or curl.

MongoDB basics

Documents and collections, SQL terms mapped to MongoDB, CRUD in mongosh, query and update operators, embedding versus referencing, indexes and an aggregation pipeline.

Mongoose and CRUD

Connecting to the database, a schema with validation, the main model methods, Express routes with Mongoose, and linking collections with ref and populate.

Authentication and tokens

Authentication versus authorization, hashing with bcrypt, creating a JWT, an auth middleware and keeping JWT_SECRET out of the code.

Errors, security and config

Loading .env with --env-file or dotenv, a 404 and global error handler, Express 4 versus Express 5 async errors, a security checklist, a clean folder layout and deployment with Render or Railway.

Projects and practice

Six projects (notes API, URL shortener, auth system, blog API, e-commerce backend, chat app), a common mistakes table and ten practice questions.

How this differs from our other Node.js pages

The Node.js Interview Questions PDF is a set of questions with model answers for interview practice. These notes teach the topics from the start with runnable examples, so read them first and use the interview PDF to test yourself. To connect your API to a React frontend and build a full app with login, continue with the MERN Stack Notes PDF.

How to study Node.js with these notes

Run every example in the notes on your own machine. Node concepts like the event loop only click when you see the output yourself.

  • Install the Node LTS, check node -v and npm -v, and run the first examples with node --watch.
  • Predict the output of the event loop example before running it, then explain why it prints 1, 4, 3, 2.
  • Build the in-memory todo API first, then replace the array with MongoDB and Mongoose.
  • Add bcrypt, JWT and the auth middleware last, and test protected routes in Postman with a Bearer token.

Keep a notes file of every error message you hit and how you fixed it. The common mistakes table on the last page is a good starting list.

Concepts and code patterns to memorise

  • Event loop order: normal code, then promise callbacks (microtasks), then timers and I/O callbacks.
  • Middleware signature (req, res, next) and why order matters.
  • req.params for URL parts, req.query for ?page=, req.body for JSON (needs express.json()).
  • SQL to MongoDB: table is collection, row is document, column is field, primary key is _id.
  • Status codes: 200, 201, 204 for success; 400, 401, 403, 404, 409 and 500 for errors.

Common mistakes beginners make

  • req.body is undefined because express.json() was not added before the routes.
  • Forgetting to await database calls.
  • Using blocking sync code such as readFileSync inside request handlers.
  • Keeping secrets in the code instead of .env and .gitignore.
  • Sending the password hash back in responses.
  • CORS errors from not allowing the frontend origin.

Interview focus: Node.js topics asked most

Node.js interviews usually start with how the runtime works, then move to Express, databases and API security.

  • Why Node is non-blocking and how the event loop works.
  • CommonJS versus ES modules.
  • Express middleware, routing and error handling.
  • PUT versus PATCH and the right status codes.
  • SQL versus MongoDB, Mongoose schemas, JWT and securing an API.

Typical interview and viva questions

  1. What is Node.js and why is it called non-blocking?
  2. Explain the event loop with an example.
  3. Compare CommonJS and ES modules.
  4. What is middleware in Express? Write one.
  5. What is the difference between PUT and PATCH, and which status codes do create and delete return?
  6. How does JWT authentication work in an Express API?
  7. How do you secure an Express API?

Practise writing a small middleware and an auth check by hand, because many interviews include a short live coding task.

A 7-day plan with the Node.js notes

  1. Day 1: Start with the runtime, modules and npm. Set up a project with ES modules and scripts.
  2. Day 2: Core modules and files, async code and events. Run the file, http server and event loop examples.
  3. Day 3: Express basics, routing and middleware. Build a server with a logger and split routes.
  4. Day 4: Building REST APIs. Write the in-memory todo CRUD and test it in Postman.
  5. Day 5: MongoDB basics, Mongoose and CRUD. Move the API to MongoDB Atlas or a local database.
  6. Day 6: Authentication and tokens. Add register, login and an auth middleware.
  7. Day 7: Errors, security and config. Add the error handlers and security steps, deploy, then answer the ten practice questions from memory.

Next, build one project from the list, such as the URL shortener or blog API, and then connect it to a React frontend.

Who these notes are for

  • Students who know JavaScript and want to build backends and APIs.
  • Freshers preparing for Node.js, backend or MERN interviews.
  • Frontend developers who want to write their own APIs.
  • Testers who test Node APIs and want to understand the code.

You should know basic JavaScript, including functions, objects and promises. For the React side and a full app with login, continue with the MERN notes linked below.

Download Node.js Notes PDF

Node.js Notes PDF: Express, REST APIs, MongoDB

The PDF carries the same content as this page in a clean, print-ready layout, so you can read it offline and keep it for revision.

11 pages · 147 KB · PDF · Updated 5 Nov 2026

Download PDF

Sources and further reading

Frequently Asked Questions

What do these Node.js notes cover?
The runtime and event loop, modules and npm, core modules, async code, Express routing and middleware, REST APIs, MongoDB, Mongoose, JWT authentication, error handling, security and deployment.
Do the notes cover Express and MongoDB?
Yes. Five of the twelve sections are about Express, REST API design, MongoDB and Mongoose, with CRUD examples you can run.
How are these notes different from the Node.js interview questions PDF?
These notes teach the topics from the start with examples. The interview questions PDF gives model answers to practise with once you know the topics.
Are these notes free?
Yes. Fill in the short form on this page and the PDF downloads right away. There is no fee for the notes.
Are these official notes or documentation?
No. They are original study notes written by the Uncodemy trainer team in a handwritten style. They are not issued by the OpenJS Foundation or MongoDB, and they do not replace the official documentation.
Can I print these notes?
Yes. Print them for personal study, write your own examples and doubts in the margins, and keep the tables and code patterns on your desk while you build projects.