Skip to content

Why Express ​

You've been calling APIs for years. Express is what a lot of those APIs are - a thin Node layer that turns req into res.json(...).

The honest pitch ​

Express isn't fancy. That's kind of the point.

In the front-end world you already live with HTTP: fetch('/api/notes'), status codes, JSON bodies, CORS headaches, auth headers. Express is the other side of that wall - a small framework that says:

  1. Listen on a port
  2. Match a method + path
  3. Run some functions (middleware)
  4. Send a response

No opinionated "controllers must live here" religion. No mandatory ORM. You wire what you need - which is great for learning, and also why bigger apps eventually grow into Nest / Fastify / whatever.

What you already know (mapped) ​

Front-end thingExpress thing
fetch('/api/notes')app.get('/api/notes', …)
React Router / Vue Router configRouter() + app.use('/api', router)
Axios interceptorsmiddleware
Response.json(data)res.json(data)
Next.js / Nuxt route handlerssame idea, less framework glue
process.env.VITE_*process.env.* (server secrets stay server-side)

As you can see, the nouns are friendlier than the marketing suggests.

Why bother if you have Next / Nuxt? ​

Those frameworks are great. They also hide the request lifecycle behind file conventions and "server actions".

I've found Express useful when I want to:

  • understand what a backend actually does without the framework costume
  • spin a tiny API next to a Vite SPA
  • read older Node codebases (there's a lot of Express out there)
  • know when Nest is worth the ceremony - and when it isn't

Where this tutorial goes ​

  1. Basics - setup, mental model, routing, middleware, JSON, errors, env/CORS
  2. Data - SQLite as "a collection on disk", a real user table
  3. Practical auth - register/login with JWT, protect routes, verification emails, password reset

We're staying TypeScript the whole way. You're a FE person; types help. 🙌

What this is not ​

  • A Nest clone
  • A full production SaaS checklist
  • "Rewrite your SPA into Express SSR" evangelism

Just enough Express to feel comfortable behind /api/....

Enjoy!

Best,

-- ł.

Notes-style Express tutorial for front-end folks