0% completed
Course Overview
On This Page
Who This Course Is For
How the Lessons Work
Course Structure
Grokking ExpressJS teaches you to build web servers and HTTP APIs with Express, the most widely used web framework for Node.js. You start with a server that answers a single request. You finish with an API that stores data in a database, authenticates users, accepts file uploads, pushes updates in real time, and runs under a process manager in production.
Every example in the course targets Express 5 on a current Node.js LTS release, and every example was run on Express 5.3 and Node.js 24. Express 5 changed several behaviors that older tutorials still teach, such as the syntax of route paths and the handling of errors in async functions. When a lesson relies on one of those changes, it says so. You can then recognize Express 4 code when you meet it in an existing project.
Who This Course Is For
The course assumes that you can write JavaScript and that you have used Node.js and npm before. You should be comfortable with modules, objects, arrow functions, and promises with async and await. You do not need any earlier experience with a web framework.
Four kinds of readers get the most from it:
- JavaScript developers who want to move into backend development.
- Frontend developers who want to build the services that their applications call.
- Backend developers who know another framework and want to learn how Express does the same work.
- Full-stack developers who want to add databases, authentication, and API security to what they already know.
How the Lessons Work
Each lesson builds one small example and extends it section by section, so that every new idea is added to code you have already seen. The early chapters build a small task list API. A list of tasks fits in one file, and it still needs the features that a real API needs. Where the output of a request teaches something, the lesson shows the real status line, headers, and body that the code produced.
Each chapter from chapter 1 onward ends with an assessment. Every attempt draws a different set of questions from a larger bank, and the questions ask you to predict what a piece of code does, rather than to repeat a sentence from a lesson.
To follow along, you need a current Node.js LTS release, a terminal, and a code editor. The lessons send requests with a browser or with curl, and chapter 4 introduces Postman for testing APIs.
Course Structure
The course has eleven chapters after this introduction, and each chapter uses only what the earlier chapters taught.
- Introduction to Express.js. What Express adds to the Node.js
httpmodule, how to create and run a first server, and how one request becomes one response. - Core Concepts. Middleware and the
next()function, the body parsers and static file server that ship with Express, writing your own middleware, and routing by HTTP method and path. - Advanced Routing. Splitting routes into modules with
express.Router(), choosing between route parameters and query parameters, grouping and versioning routes, and handling errors in routes. - Building RESTful APIs. The principles of REST design, create, read, update and delete operations (CRUD) on a resource, testing an API with Postman, and returning clear validation errors.
- Working with Databases. Choosing between SQL and NoSQL databases, connecting to MongoDB with Mongoose and to PostgreSQL with the Sequelize ORM, and running the same CRUD operations on each.
- Authentication and Security. Session, token, OAuth and API key strategies, password hashing, JSON Web Token (JWT) authentication, and protecting an API with Helmet, CORS, and rate limiting.
- File Uploads and Handling Forms. Receiving files with Multer, validating their type and size, and reading HTML form submissions.
- Real-Time Applications with WebSockets. How WebSockets differ from ordinary HTTP requests, adding a WebSocket server to an Express app, and sending events to many clients with Socket.IO.
- Testing and Debugging. Testing routes with Jest and Supertest, using the Node.js debugger, and logging requests and errors with Morgan and Winston.
- Performance Optimization. Running and restarting an app with PM2, spreading requests over several processes and several servers, and caching responses in Redis.
- Best Practices. Structuring a maintainable project, extending the logging setup of chapter 9 for production, monitoring a running server, and using streams and worker threads for large or slow work.
By the end, you can design an Express API, connect it to a database, secure it, test it, and run it in production.
Reading Progress
0%
On This Page
Who This Course Is For
How the Lessons Work
Course Structure