0% completed
Course Overview
On This Page
What You Need Before You Start
Who This Course Is For
How the Course Is Organized
What Each Chapter Covers
What You Will Be Able to Do
Grokking Node.js teaches you to write server-side applications in JavaScript. It starts with how the Node.js runtime runs your code and works up to web servers, databases, authentication, real-time messaging, testing and running an application on more than one process.
Every chapter is built on code that you type and run yourself. You see the output, the status codes and the error messages that the code really produces, and the lessons explain why each one appears.
What You Need Before You Start
You should already 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. The course explains callbacks, promises and async/await in its own chapter, so a first acquaintance with them is enough.
You also need Node.js installed on your computer. Install a current long-term support (LTS) release from nodejs.org, then check it from a terminal:
node --version
The command prints the installed version, for example v24.16.0. A few lessons need software of their own, and each one says so where it starts. The database chapter uses a MongoDB server and a PostgreSQL or MySQL server, and the caching lesson uses a Redis server.
Who This Course Is For
JavaScript developers who have only worked in the browser. You already know the language, and the course shows you what changes when the same language runs on a server.
Frontend developers moving toward full-stack work. You learn to build the APIs that a React, Vue or Angular application calls, including the database and login parts behind them.
Backend developers who know another language. If you have built servers in Java, Python, PHP or Go, the course explains how Node.js handles many requests with one main thread, which is the part that works differently from most of those platforms.
Full-stack developers who want firmer backend skills. The later chapters cover databases, authentication, security, testing and process management in more depth than a typical tutorial.
How the Course Is Organized
The course has a short introduction and eleven chapters. Each chapter is a set of lessons followed by an assessment. Chapters 1 to 8 hold 20 multiple-choice questions and chapters 9 to 11 hold 15, and each attempt draws about half of them, so a later attempt can show different questions. Every option has an explanation, so read them after you answer, including those for the options you did not choose.
The chapters build on each other. Chapter 1 explains the event loop and non-blocking input and output, and every later chapter relies on that model. Chapter 4 builds a web server with the built-in http module, so that chapter 5 can show what Express.js does for you when it replaces that code.
What Each Chapter Covers
- Introduction to Node.js. What Node.js is, how the event-driven, non-blocking model lets one thread serve many requests, and which parts make up the runtime.
- Core Modules and File System. How CommonJS and ES modules work, the built-in
fs,path,osandhttpmodules, reading and writing files, and theprocessobject with command-line arguments and environment variables. - Asynchronous Programming. Callbacks, promises and
async/await, the event loop and its order of work, timers, and theEventEmitterclass. - Building Web Servers. A web server with the
httpmodule, reading requests and sending responses, routing by URL, and serving static files. - Express.js. Why Express exists, a basic Express server, middleware, and routes for each HTTP method.
- Databases. The difference between SQL and NoSQL databases, MongoDB with Mongoose, create, read, update and delete operations, and PostgreSQL and MySQL from Node.js.
- Authentication and Security. Authentication strategies, login with JSON Web Tokens (JWT), password hashing with
bcrypt, and defenses against SQL injection, cross-site scripting and cross-site request forgery. - WebSockets. Real-time communication, a WebSocket server, a chat application with Socket.IO, and broadcasting messages to all clients or to groups of them.
- Testing and Debugging. Debugging with
console, the built-in Node.js debugger and VS Code, unit and integration tests, and error handling. - Performance Optimization. Keeping an application running with PM2, spreading requests across processes with clustering and load balancing, and caching with Redis.
- Best Practices. Clean and maintainable code, logging and monitoring in production, and two advanced features: streams and worker threads.
What You Will Be Able to Do
By the end of the course, you will be able to build a REST API with Express, store its data in MongoDB or a SQL database, protect it with hashed passwords and tokens, and add real-time updates with WebSockets. You will also be able to test it, find bugs in it with a debugger, and run it on several processes with caching in front of the database.
The course does not cover deployment to a particular cloud provider, containers, or TypeScript. Each of those topics builds on what you learn here.
Reading Progress
0%
On This Page
What You Need Before You Start
Who This Course Is For
How the Course Is Organized
What Each Chapter Covers
What You Will Be Able to Do