Grokking Node.js
Learn to build server-side applications in JavaScript with Node.js, from the event loop to Express APIs, databases, authentication, WebSockets, testing, and scaling.

Course Overview
Node.js runs JavaScript outside the browser, so the same language can run the server behind a web application. Most of what makes Node.js different comes from one design: a single main thread that serves many requests because it never waits for input and output. This course starts with that design and the event loop that drives it, because every later topic depends on it. You then work with modules, files, and the process object, and you write asynchronous code with callbacks, promises, and async/await while learning the order in which it runs. From there you build web servers, first with the built-in http module and then with Express, so you can see what the framework does for you. You store data in MongoDB and in SQL databases, add login with sessions, tokens, and hashed passwords, defend against common attacks, and add real-time messaging with WebSockets and Socket.IO. The last chapters cover debugging, testing, error handling, process management, clustering, caching, logging, streams, and worker threads. Every example was run, so the output, status codes, and error messages you read are the ones the code produced, and each chapter ends with an assessment that explains every answer.
What you'll learn in Grokking Node.js
- Explain how Node.js runs JavaScript on a server, and how one thread serves many requests through the event loop.
- Write asynchronous code with callbacks, promises, and async/await, and predict the order in which it runs.
- Build REST APIs with Express 5, using middleware, routers, and a central error handler.
- Add login with sessions or JSON Web Tokens, and store passwords safely with bcrypt.
- Add real-time features with WebSockets and Socket.IO, including broadcasts and rooms.
- Keep an application running with PM2, spread load with clustering, and cache data with Redis.
- Check your understanding with an assessment at the end of every chapter that explains every answer.
- Organize code into CommonJS and ES modules, and use the built-in fs, path, os, http, and process modules.
- Build a web server with the http module, including routing, request bodies, and safe static file serving.
- Store data in MongoDB with Mongoose, and in PostgreSQL or MySQL with parameterized queries.
- Defend an application against SQL injection, cross-site scripting, and cross-site request forgery.
- Debug with the Node.js debugger and VS Code, and write unit and integration tests with Jest and Supertest.
- Write structured logs, find a memory leak, and use streams and worker threads for large or heavy work.
Course Content
What people say about our courses






About the Author

Arslan Ahmad
Industry Expertise & Leadership
Arslan Ahmad is the lead author of Grokking Node.js. As the founder of Design Gurus and a former FAANG hiring manager, he has worked at industry giants like Facebook (now Meta) and Microsoft.
He has conducted hundreds of system design interviews, giving him unique insight into what top tech companies look for in candidates.
The course also incorporates expertise from senior engineers at Google, Meta, Amazon, Microsoft, and Uber, ensuring you learn system design best practices from professionals who have built and scaled real-world systems.
500+
Interviews Conducted
10k+
Students Taught
Related Courses
$197
$48
$48
FAQs
What is Grokking Node.js?
It is a course on building server-side applications in JavaScript with Node.js. It starts with how the runtime and the event loop run your code, then covers modules and files, asynchronous code, web servers, Express, databases, authentication and security, WebSockets, testing and debugging, performance, and production practices.
Who is this course for?
It is for JavaScript developers who have only worked in the browser, frontend developers moving toward full-stack work, backend developers who know Java, Python, PHP, or Go and want to learn how Node.js handles requests differently, and full-stack developers who want firmer backend skills.
What do I need to know before I start?
You should be comfortable with JavaScript itself: variables, functions, arrow functions, objects, arrays, and template literals. You do not need any experience with Node.js, servers, or databases. Callbacks, promises, and async/await are explained in their own chapter, so a first acquaintance with them is enough.
What do I need to follow along?
You need a current long-term support release of Node.js, a code editor, and a terminal. The examples run on your own computer, since the course does not include a built-in environment in the browser. A few lessons need software of their own, a MongoDB server, a PostgreSQL or MySQL server, or a Redis server, and each of those lessons says so where it starts.
Which versions of Node.js and Express does the course use?
The examples were run on Node.js 24, and the Express lessons use Express 5, the current major version. Where Express 4 or an older Node.js release behaves differently, the lesson says so, which helps when you work on an existing project.
Are there quizzes or assessments?
Yes. Each chapter ends with an assessment of multiple-choice questions, and each attempt draws about half of them, so a later attempt can show different questions. Most questions describe a situation, like a server that slows down while it resizes images, and every option comes with an explanation.
Does the course teach Express or plain Node.js?
Both. You first build a web server with the built-in http module, with routing, request bodies, and static files written by hand. The Express chapter then rebuilds the same ideas, so you can see what the framework does for you and when plain Node.js is enough.
Which databases does the course cover?
It covers MongoDB with Mongoose, and PostgreSQL and MySQL with the pg and mysql2 drivers. You perform create, read, update, and delete operations, use a connection pool, write queries with placeholders to prevent SQL injection, and learn when a document database or a relational database fits better.
Does the course cover security?
Yes. It covers sessions and JSON Web Tokens, sign-in with Google through Passport, password hashing with bcrypt, limiting login attempts, and defenses against SQL injection, cross-site scripting, and cross-site request forgery, along with security headers set by helmet.
Does the course cover deployment?
It covers running an application in production: restarting it with PM2, starting it again after a reboot, spreading requests across processes with clustering and NGINX, caching with Redis, and logging and monitoring. It does not cover deployment to a particular cloud provider, containers, or TypeScript.
