← Back to Node.js Course | Chapter 7: Express.js Basics | Lesson 1 of 7

What is Express

Express is a small framework on top of Node's http module that makes routing and middleware easy.

In this page:

  1. What is Express

What is Express

Express wraps Node's HTTP server with a friendly API for routes, middleware and templating. It is unopinionated and the base of many other frameworks. An Express app is a function you pass to http.createServer or run with app.listen.

Note: Express itself is tiny; its power comes from middleware.

Example: What is Express

bash
$ node -e "console.log(typeof require('express'))"
function
$ # A minimal Express app
const express = require("express");
const app = express();
app.get("/", (req, res) => res.send("Hello Express"));
app.listen(3000);

⚠️ Run this in your own terminal or Node.js environment.

Related Topics
Common Mistakes
  1. Thinking Express replaces Node
  2. Adding too much middleware
  3. Ignoring error handling
Chapter Summary
  • Express is a web framework for Node
  • It simplifies routing
  • Middleware adds features
  • Built on http
🔒

Chapter Quiz — Complete all 7 topics to unlock

0/7 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.