Express.js Foundations in Express.js
Express.js Foundations is the first chapter of the free Express.js tutorial. It starts with what Express is and how the web talks, so every later lesson makes sense.
What each lesson covers:
- Introduction to Express.js: What Express is and why it was created, its features, Express versus the Node.js http module, Express 4 versus Express 5, how a request flows through an app, and how to set up, run and test your first Express 5 server.
- HTTP Fundamentals: Clients and servers, URLs, headers and bodies, HTTP methods, status codes, content types and the Express request-response cycle.
You need no setup to start. Every lab on this site runs a small Express 5 server in your browser. The lessons also show the same steps on your own computer with Node.js and npm.
Each lesson ends with exercises. Check starts your server and sends it real requests, so it grades what your server does, not how your code looks.
Lessons in this section
- Introduction to Express.js
What Express.js is and why it was created, its history and features, Express versus the Node.js http module, Express 4 versus Express 5, how a request flows through an app, what you can build, and how to set up, configure, run and test your first Express 5 server.
- Explain what Express.js is and why developers use it
- Compare Express with the Node.js http module and Express 4 with Express 5
- Set up an Express 5 project with npm, ES modules and npm scripts
- Read the port from environment variables with --env-file or dotenv
- HTTP Fundamentals
Clients and servers, requests and responses, URLs, origins, paths and endpoints, headers and bodies, HTTP methods, status codes, content types, and the Express request-response cycle.
- Name the parts of a URL and an HTTP message
- Choose the right HTTP method for an action
- Pick the right status code for a response
- Set and read content types