Skip to content
BENIBIX Learn

Node.js vs Express

People think Node.js is a framework like Express, and it is not. Node.js is the program that runs JavaScript outside the browser. Express is a small framework that runs on Node.js and adds routes and middleware. You need Node.js to use Express, but not the other way round.

Development⚙️ Compilers & Runtimes

Node.js

A tool that runs JavaScript outside the browser. Servers use it a lot.

Node.js is a program that runs JavaScript outside the browser. Before it, JavaScript could only run inside web pages. It is built on the same engine that runs JavaScript in Chrome. It handles lots of users at once. It never sits still while it waits. It comes with npm, the largest store of code packages in the world.

Example
Node.js was created by Ryan Dahl and first released in 2009. Jack uses it to run his shop's server and his build tools.
Why it matters
It lets you use one language for both the page and the server. Most web build tools run on it.
Full entry
Development🌐 Web Development

Express.js

A small, plain web framework. It helps you build a server with Node.js.

Express is a small, simple web framework for Node.js. It lets you set up routes, read requests and send responses in a few lines. It does little on its own, so you add pieces called middleware for things like logins or reading forms. It was first released in 2010 and is one of the most used server tools in JavaScript. Many other Node.js frameworks are built on its ideas.

Example
Lucy builds a tiny API for her shop with Express. Ten lines of code answer requests on port 3000.
Why it matters
Lots of coders start their server work with Express. It is small and easy to read.
Full entry

In one line

Node.js
A tool that runs JavaScript outside the browser. Servers use it a lot.
Express.js
A small, plain web framework. It helps you build a server with Node.js.