Skip to content

Spike: Node.js with Express

  • Author: Esteban
  • Date: 2026-11-26
  • Timebox: 30 minutes
  • Why this timebox: the same duration as the FastAPI and ASP.NET Core spikes, so the results can be compared.
  • Time actually spent: 20 minutes
  • Setup: Node.js 20.20.2, npm, Express 5.1.0
  • Prior experience: I was already comfortable with Node.js and Express, which made this spike easier than trying a new stack.

Where I was when the time ran out

  • Server on port 8080
  • GET /ping answers {"status":"ok"}
  • Port read from the PORT environment variable (default 8080; also tested with PORT=9000)
  • OpenAPI page served (bonus): Swagger UI at /docs
  • OAuth login (bonus): not started

The server target was reached. The OpenAPI page was added afterward and confirmed working.

What took the most time

  • Nothing major. Express was easy to pick up and the documentation was good. The OpenAPI bonus needed an additional package and an OpenAPI document for /ping.

What it would take to go further

  • Try a GitHub OAuth login and record the setup effort and user flow.
  • Evaluate background jobs for AREA hooks; this spike did not cover a scheduler or task queue.
  • Try running the server in Docker.

Running the spike

cd spikes/express
npm install
# Copy .env.example to .env if needed, then set PORT in .env
npm start
curl http://localhost:8080/ping
# OpenAPI page: http://localhost:8080/docs

# To override the .env value for one run:
PORT=9000 npm start

Impressions

  • Liked: Express was easy to pick up, and its documentation was good. A basic JSON route is short and easy to read.
  • Got in the way: OpenAPI is not served out of the box; swagger-ui-express and a document describing the routes had to be added.
  • For AREA: the HTTP and OpenAPI targets are reached. OAuth and background jobs still need separate evaluation.